diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-01-29 14:01:41 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-01-29 14:01:41 +0200 |
commit | f4d5d71da4f94bf9bc87505e745eed913c9858b9 (patch) | |
tree | c5c2e7505c74d4bb500675cc57fdf9b1cf554e34 /php/logout.php | |
parent | fdea65e03218d175bcc5d5f2bbb426688a6cf42e (diff) | |
download | fileup-f4d5d71da4f94bf9bc87505e745eed913c9858b9.tar.gz |
Login is now remembered in $_SESSION['username']
If it is set, user is logged in, if it is unset
user is not logged in
Diffstat (limited to 'php/logout.php')
-rw-r--r-- | php/logout.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/php/logout.php b/php/logout.php new file mode 100644 index 0000000..9a4cdd7 --- /dev/null +++ b/php/logout.php @@ -0,0 +1,10 @@ +<?php +// TODO +// This is dangerous and stupid +// Right now every webpage can redirect any of its users to http://shady.upload/logout +// which will log the user out of our webpage + +session_start(); +unset($_SESSION['username']); +header('Location: /'); +?> |