function logout($req, $hash, $apiId, $sign) { $af = new AccountManager(); $result = $af->Logout($hash); if ($result) { return api_response(array('LoggedOut' => $result)); } else { return api_error(ApiErrorCode::AuthAlreadyLoggedOut, 'Account already logged out!'); } }