mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
cannot deactivate postpaid
This commit is contained in:
parent
a04c3dd82b
commit
7f72b0c34a
3 changed files with 10 additions and 7 deletions
|
@ -40,7 +40,7 @@ class Admin
|
|||
$isValid = self::validateToken($_SESSION['aid'], $_COOKIE['aid']);
|
||||
if (!$isValid) {
|
||||
self::removeCookie();
|
||||
_alert(Lang::T('Token has expired. Please log in again.'), 'danger', "admin");
|
||||
_alert(Lang::T('Token has expired. Please log in again.') . '.'.$_SESSION['aid'], 'danger', "admin");
|
||||
return 0;
|
||||
}
|
||||
return $_SESSION['aid'];
|
||||
|
@ -57,7 +57,7 @@ class Admin
|
|||
}
|
||||
if (!empty($_COOKIE['aid']) && !$isValid) {
|
||||
self::removeCookie();
|
||||
_alert(Lang::T('Token has expired. Please log in again.'), 'danger', "admin");
|
||||
_alert(Lang::T('Token has expired. Please log in again.') . '..', 'danger', "admin");
|
||||
return 0;
|
||||
} else {
|
||||
if (time() - $tmp[1] < 86400 * 7) {
|
||||
|
@ -124,7 +124,9 @@ class Admin
|
|||
'samesite' => 'Lax',
|
||||
]);
|
||||
session_destroy();
|
||||
unset($_COOKIE['aid']);
|
||||
session_unset();
|
||||
session_start();
|
||||
unset($_COOKIE['aid'], $_SESSION['aid']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,10 +153,10 @@ class Admin
|
|||
{
|
||||
global $config;
|
||||
$query = ORM::for_table('tbl_users')->select('login_token')->findOne($aid);
|
||||
if($config['single_session'] != 'yes'){
|
||||
if ($config['single_session'] != 'yes') {
|
||||
return true; // For multi-session, any token is valid
|
||||
}
|
||||
if(empty($query)){
|
||||
if (empty($query)) {
|
||||
return true;
|
||||
}
|
||||
return $query->login_token === sha1($cookieToken);
|
||||
|
|
|
@ -874,5 +874,6 @@
|
|||
"Welcome_Message": "Welcome Message",
|
||||
"will_be_replaced_with_Customer_password": "will be replaced with Customer password",
|
||||
"will_be_replaced_with_Customer_Portal_URL": "will be replaced with Customer Portal URL",
|
||||
"will_be_replaced_with_Company_Name": "will be replaced with Company Name"
|
||||
"will_be_replaced_with_Company_Name": "will be replaced with Company Name",
|
||||
"Token_has_expired__Please_log_in_again_": "Token has expired. Please log in again."
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue