From: Arun Persaud Date: Mon, 10 Dec 2012 02:39:26 +0000 (-0800) Subject: BUGFIX: fix error when user is not logged in, but tries to access his home page X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=4681b437e331256dc70663f130ce2de57a03d099;ds=sidebyside BUGFIX: fix error when user is not logged in, but tries to access his home page needed to test, if variables were set or not. --- diff --git a/include/user.php b/include/user.php index d486b07..607e89d 100644 --- a/include/user.php +++ b/include/user.php @@ -101,10 +101,14 @@ else { /* normal user page */ /* verify password and email */ - $ok = 1; - $myid = DB_get_userid('email-password',$email,$password); - if(!$myid) + if(isset($email, $password)) + { + $myid = DB_get_userid('email-password',$email,$password); + if(!$myid) + $ok = 0; + } + else $ok = 0; if($ok)