X-Git-Url: http://git.pjr.cc/?p=gwvp.git;a=blobdiff_plain;f=gwvplib%2Fgwvpauth.php;h=086af98d6467cf5fb29b59432909aa9c91626fdb;hp=ad42b2b98b2c9c89470630d49e7fc2958b4ba32b;hb=507bc8f2818a42d751ed6e2e2fc68ee2bde94016;hpb=d8838ab5dbcab38ab548ad7b74047bf507217063 diff --git a/gwvplib/gwvpauth.php b/gwvplib/gwvpauth.php index ad42b2b..086af98 100644 --- a/gwvplib/gwvpauth.php +++ b/gwvplib/gwvpauth.php @@ -40,7 +40,6 @@ function gwvp_AskForBasicAuth() if(!isset($_SERVER["PHP_AUTH_USER"])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); - exit(0); } else return; } @@ -59,12 +58,6 @@ function gwvp_CheckAuthLevel($levels) return false; } -function gwvp_fourZeroThree() -{ - header("HTTP/1.0 403 Permission Denied"); - exit(0); -} - function gwvp_AuthNoPerms() { gwvp_goMainPage("gwvp_AuthNoPermsBody"); @@ -122,9 +115,11 @@ function gwvp_AuthHandleLogin() gwvp_SendMessage("error", "Login Failed"); header("Location: $BASE_URL"); } else { + $details = gwvp_getUser($user); $_SESSION["isloggedin"] = true; $_SESSION["username"] = "$user"; $_SESSION["fullname"] = $details["fullname"]; + $_SESSION["id"] = $details["id"]; if(gwvp_IsUserAdmin($details["email"])) { $_SESSION["usertype"] = "admin"; } else { @@ -227,7 +222,7 @@ function gwvp_SingleLineLoginForm() echo "
Username "; echo " Passowrd "; if(gwvp_IsRegistrationEnabled()) echo "Register
"; - else echo ""; + else echo "
"; }