X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/0b8bc44d7afc8c7249c697a7584fc9d1646e7c4d..bfbbf72959faa385b97d250484be1d25e4fd22aa:/lib/functions.php?ds=inline diff --git a/lib/functions.php b/lib/functions.php index 1e084fb..9672fe1 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1476,7 +1476,7 @@ function jirafeau_admin_session_start() $_SESSION['admin_csrf'] = md5(uniqid(mt_rand(), true)); } -function jirafeau_admin_session_end() +function jirafeau_session_end() { $_SESSION = array(); session_destroy(); @@ -1496,6 +1496,17 @@ function jirafeau_admin_csrf_field() return ""; } +function jirafeau_user_session_start() +{ + $_SESSION['user_auth'] = true; +} + +function jirafeau_user_session_logged() +{ + return isset($_SESSION['user_auth']) && + $_SESSION['user_auth'] === true; +} + function jirafeau_dir_size($dir) { $size = 0;