} else {
// TRANS: Client error when submitting a form with unexpected information.
$this->clientError(_('Unexpected form submission.'), 401);
- return false;
}
}
if (empty($appUser)) {
// TRANS: Client error when trying to revoke access for an application while not being a user of it.
$this->clientError(_('You are not a user of that application.'), 401);
- return false;
}
$app = Oauth_application::getKV('id', $appUser->application_id);
- $datastore = new ApiGNUSocialOAuthDataStore();
+ $datastore = new ApiGNUsocialOAuthDataStore();
$datastore->revoke_token($appUser->token, 1);
$result = $appUser->delete();
// TRANS: Client error when revoking access has failed for some reason.
// TRANS: %s is the application ID revoking access failed for.
$this->clientError(sprintf(_('Unable to revoke access for application: %s.'), $app->id));
- return false;
}
$msg = 'API OAuth - user %s (id: %d) revoked access token %s for app id %d';