mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Subscribe
This commit is contained in:
1 parent
696ff07987
commit
1642ece7f4
2 files changed
+10
-3
No files matched your search
@@ -61,4 +61,10 @@ class AuthManager {
|
||||
};
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getUserId($bearer){
|
||||
$token = explode(' ', $bearer)[1];
|
||||
$userid = Db::loadOne('SELECT user_id FROM tokens WHERE token = ? AND expire >= CURRENT_TIMESTAMP AND blocked = 0;', array($token))['user_id'];
|
||||
return $userid;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user