diff --git a/functions/account_functions.php b/functions/account_functions.php index 970de5e..f69acf1 100644 --- a/functions/account_functions.php +++ b/functions/account_functions.php @@ -47,7 +47,8 @@ function login($username, $password, $stay_logged_in) } $_SESSION['user_id'] = $user['user_id']; - $_SESSION['username'] = $user['role_id']; + $_SESSION['username'] = $user['username']; + $_SESSION['role_id'] = $user['role_id']; if ($stay_logged_in) { $token = bin2hex(random_bytes(64));