Subscribe

This commit is contained in:
GamerClassN7
2021-01-05 20:27:49 +01:00
parent 696ff07987
commit 1642ece7f4
2 changed files with 10 additions and 3 deletions

View File

@@ -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;
}
}