mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 02:04:53 +02:00
Update: Force Logout
add Force Logout in maintenance mode Function: if it enabled the system will kick out the user from the dashboard, but if not enabled the system will retain the user login section and display maintenance mode message.
This commit is contained in:
parent
01dd855632
commit
390de53e2e
3 changed files with 17 additions and 2 deletions
|
@ -161,8 +161,11 @@ class User
|
|||
{
|
||||
global $config;
|
||||
if ($config['maintenance_mode'] == true) {
|
||||
displayMaintenanceMessage();
|
||||
// r2(U . 'logout', 'd', '');
|
||||
if ($config['maintenance_mode_logout'] == true) {
|
||||
r2(U . 'logout', 'd', '');
|
||||
} else {
|
||||
displayMaintenanceMessage();
|
||||
}
|
||||
}
|
||||
if (!$id) {
|
||||
$id = User::getID();
|
||||
|
|
|
@ -775,10 +775,12 @@ switch ($action) {
|
|||
}
|
||||
if (_post('save') == 'save') {
|
||||
$status = isset($_POST['maintenance_mode']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
|
||||
$force_logout = isset($_POST['maintenance_mode_logout']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
|
||||
$date = isset($_POST['maintenance_date']) ? $_POST['maintenance_date'] : null;
|
||||
|
||||
$settings = [
|
||||
'maintenance_mode' => $status,
|
||||
'maintenance_mode_logout' => $force_logout,
|
||||
'maintenance_date' => $date
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue