Simplified code
This commit is contained in:
parent
8cde7fe51f
commit
85217941e3
1 changed files with 3 additions and 3 deletions
|
@ -191,12 +191,12 @@ class BaseApi extends BaseModule
|
|||
*/
|
||||
protected static function login(string $scope)
|
||||
{
|
||||
$token = OAuth::getCurrentApplicationToken();
|
||||
if (!empty($token)) {
|
||||
$uid = OAuth::getCurrentUserID();
|
||||
|
||||
if (!empty($uid)) {
|
||||
if (!OAuth::isAllowedScope($scope)) {
|
||||
DI::mstdnError()->Forbidden();
|
||||
}
|
||||
$uid = OAuth::getCurrentUserID();
|
||||
}
|
||||
|
||||
if (empty($uid)) {
|
||||
|
|
Loading…
Reference in a new issue