mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-07 08:36:28 +02:00
Move unaffected code outside of try/catch statement
This commit is contained in:
@@ -1457,12 +1457,12 @@ final class Auth extends UserManager {
|
|||||||
'SELECT resettable FROM ' . $this->makeTableName('users') . ' WHERE id = ?',
|
'SELECT resettable FROM ' . $this->makeTableName('users') . ' WHERE id = ?',
|
||||||
[ $this->getUserId() ]
|
[ $this->getUserId() ]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (int) $enabled === 1;
|
|
||||||
}
|
}
|
||||||
catch (Error $e) {
|
catch (Error $e) {
|
||||||
throw new DatabaseError($e->getMessage());
|
throw new DatabaseError($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (int) $enabled === 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new NotLoggedInException();
|
throw new NotLoggedInException();
|
||||||
|
Reference in New Issue
Block a user