mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -849,5 +849,8 @@
|
|||
"Ask_Telegram_Community": "Ask Telegram Community",
|
||||
"Transaction_History_List": "Transaction History List",
|
||||
"Login_as_Customer": "Login as Customer",
|
||||
"info": "info"
|
||||
"info": "info",
|
||||
"Registration_code": "Registration code",
|
||||
"Admin_can_only_have_single_session_login__it_will_logout_another_session": "Admin can only have single session login, it will logout another session",
|
||||
"Single_session_Admin": "Single session Admin"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue