AND `tokens`.`id`='%s' AND `tokens`.`scope`='request'",
dbesc($token));
- if (!count($r))
+ if (!dbm::is_result($r))
return null;
return $r[0];
}
-function api_post(&$a) {
+function api_post(App &$a) {
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Permission denied.') . EOL);
return;
}
}
-function api_content(&$a) {
+function api_content(App &$a) {
if ($a->cmd=='api/oauth/authorize'){
/*
* api/oauth/authorize interact with the user. return a standard page
}
- if(! local_user()) {
- //TODO: we need login form to redirect to this page
+ if (! local_user()) {
+ /// @TODO We need login form to redirect to this page
notice( t('Please login to continue.') . EOL );
return login(false,$request->get_parameters());
}