mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Fix get/set admin username
This commit is contained in:
parent
56b9ff5a3b
commit
cd7820ddd2
2 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@ function DisplayAuthConfig($username)
|
|||
$status = new \RaspAP\Messages\StatusMessage;
|
||||
$auth = new \RaspAP\Auth\HTTPAuth;
|
||||
$config = $auth->getAuthConfig();
|
||||
$username = $config['admin_user'];
|
||||
$password = $config['admin_pass'];
|
||||
|
||||
if (isset($_POST['UpdateAdminPassword'])) {
|
||||
|
|
|
@ -96,6 +96,7 @@ class HTTPAuth
|
|||
if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
|
||||
$config['admin_user'] = trim(fgets($auth_details));
|
||||
$config['admin_pass'] = trim(fgets($auth_details));
|
||||
$_SESSION['user_id'] = $config['admin_user'];
|
||||
fclose($auth_details);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue