mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 17:54:41 +02:00
Single session Admin can be set in the misc settings
This commit is contained in:
parent
5f6b14ab7e
commit
f0da633808
3 changed files with 26 additions and 1 deletions
|
@ -149,7 +149,14 @@ class Admin
|
|||
|
||||
public static function validateToken($aid, $cookieToken)
|
||||
{
|
||||
global $config;
|
||||
$query = ORM::for_table('tbl_users')->select('login_token')->findOne($aid);
|
||||
if($config['single_session'] != 'yes'){
|
||||
return true; // For multi-session, any token is valid
|
||||
}
|
||||
if(empty($query)){
|
||||
return true;
|
||||
}
|
||||
return $query->login_token === sha1($cookieToken);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue