Avoid problems with uid=0
This commit is contained in:
parent
fa5acb3b21
commit
bd0e2dc0a8
4 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ class FKOAuth1 extends OAuthServer
|
|||
$a = DI::app();
|
||||
$record = DBA::selectFirst('user', [], ['uid' => $uid, 'blocked' => 0, 'account_expired' => 0, 'account_removed' => 0, 'verified' => 1]);
|
||||
|
||||
if (!DBA::isResult($record)) {
|
||||
if (!DBA::isResult($record) || empty($uid)) {
|
||||
Logger::info('FKOAuth1::loginUser failure', ['server' => $_SERVER]);
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
die('This api requires login');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue