BUGFIX: fix error when user is not logged in, but tries to access his home page
authorArun Persaud <arun@nubati.net>
Mon, 10 Dec 2012 02:39:26 +0000 (18:39 -0800)
committerArun Persaud <arun@nubati.net>
Mon, 10 Dec 2012 02:39:26 +0000 (18:39 -0800)
needed to test, if variables were set or not.

include/user.php

index d486b07..607e89d 100644 (file)
@@ -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)