mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 15:10:22 +00:00
Update user_id session var auth context
This commit is contained in:
parent
2e4d76a419
commit
ae44f5476d
2 changed files with 1 additions and 1 deletions
|
@ -26,6 +26,7 @@ function DisplayAuthConfig($username)
|
||||||
fwrite($auth_file, password_hash($_POST['newpass'], PASSWORD_BCRYPT).PHP_EOL);
|
fwrite($auth_file, password_hash($_POST['newpass'], PASSWORD_BCRYPT).PHP_EOL);
|
||||||
fclose($auth_file);
|
fclose($auth_file);
|
||||||
$username = $new_username;
|
$username = $new_username;
|
||||||
|
$_SESSION['user_id'] = $username;
|
||||||
$status->addMessage('Admin password updated');
|
$status->addMessage('Admin password updated');
|
||||||
} else {
|
} else {
|
||||||
$status->addMessage('Failed to update admin password', 'danger');
|
$status->addMessage('Failed to update admin password', 'danger');
|
||||||
|
|
|
@ -96,7 +96,6 @@ class HTTPAuth
|
||||||
if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
|
if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
|
||||||
$config['admin_user'] = trim(fgets($auth_details));
|
$config['admin_user'] = trim(fgets($auth_details));
|
||||||
$config['admin_pass'] = trim(fgets($auth_details));
|
$config['admin_pass'] = trim(fgets($auth_details));
|
||||||
$_SESSION['user_id'] = $config['admin_user'];
|
|
||||||
fclose($auth_details);
|
fclose($auth_details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue