summaryrefslogtreecommitdiffstats
path: root/include/user.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-12-09 18:39:26 -0800
committerArun Persaud <arun@nubati.net>2012-12-09 18:39:26 -0800
commit4681b437e331256dc70663f130ce2de57a03d099 (patch)
treeec4e7730f69142d3ed8f9f1a811ee40f384b7fa3 /include/user.php
parent92d9bfa8b94111e0684029cf1237cbc9b64728ac (diff)
downloade-DoKo-4681b437e331256dc70663f130ce2de57a03d099.tar.gz
e-DoKo-4681b437e331256dc70663f130ce2de57a03d099.tar.bz2
e-DoKo-4681b437e331256dc70663f130ce2de57a03d099.zip
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.
Diffstat (limited to 'include/user.php')
-rw-r--r--include/user.php10
1 files changed, 7 insertions, 3 deletions
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)