mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:10:13 +00:00
allow_api removed
This commit is contained in:
parent
98b68b47f0
commit
42bd7918ad
3 changed files with 3 additions and 44 deletions
|
@ -123,7 +123,6 @@ class BasicAuth
|
|||
private static function getUserIdByAuth(bool $do_login = true):int
|
||||
{
|
||||
$a = DI::app();
|
||||
Session::set('allow_api', false);
|
||||
self::$current_user_id = 0;
|
||||
|
||||
// workaround for HTTP-auth in CGI mode
|
||||
|
@ -187,15 +186,10 @@ class BasicAuth
|
|||
|
||||
DI::auth()->setForUser($a, $record, false, false, $login_refresh);
|
||||
|
||||
Session::set('allow_api', true);
|
||||
|
||||
Hook::callAll('logged_in', $record);
|
||||
|
||||
if (Session::get('allow_api')) {
|
||||
self::$current_user_id = local_user();
|
||||
} else {
|
||||
self::$current_user_id = 0;
|
||||
}
|
||||
self::$current_user_id = local_user();
|
||||
|
||||
return self::$current_user_id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue