diff --git a/includes/admin.php b/includes/admin.php index 70c29b7c1..b3be3c36c 100755 --- a/includes/admin.php +++ b/includes/admin.php @@ -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'])) { diff --git a/src/RaspAP/Auth/HTTPAuth.php b/src/RaspAP/Auth/HTTPAuth.php index 9751075f3..7c31e0f9d 100755 --- a/src/RaspAP/Auth/HTTPAuth.php +++ b/src/RaspAP/Auth/HTTPAuth.php @@ -96,6 +96,7 @@ public function getAuthConfig() 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); } }