From 232ec00948655b8c68035368400b0a79c101976b Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 13 Feb 2021 12:13:13 +0200 Subject: removed usename from session --- php/login.php | 2 -- php/logout.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'php') diff --git a/php/login.php b/php/login.php index c26445e..6fb3909 100644 --- a/php/login.php +++ b/php/login.php @@ -13,14 +13,12 @@ if(gettype($username)!="string" || gettype($password)!="string") die("You didn't specify the pass or the username"); } -$database=new Database(); $user=$database->authenticate($username,$password); if(!$user) { die("Password or username is incorrect"); } -$_SESSION['username'] = $user->username; $_SESSION['user_object'] = $user; header('Location: /'); diff --git a/php/logout.php b/php/logout.php index 9a4cdd7..d37b0a0 100644 --- a/php/logout.php +++ b/php/logout.php @@ -5,6 +5,6 @@ // which will log the user out of our webpage session_start(); -unset($_SESSION['username']); +unset($_SESSION['user_object']); header('Location: /'); ?> -- cgit v1.2.3