forked from kevinowino869/mitrobill
Single session Admin can be set in the misc settings
This commit is contained in:
@ -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"
|
||||
}
|
Reference in New Issue
Block a user