summaryrefslogtreecommitdiffstats
path: root/include/login.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-08-17 21:41:39 -0700
committerArun Persaud <arun@nubati.net>2008-08-17 21:41:39 -0700
commit1c3c341f53ce5de7e9d4bcc63e43a925faec3f48 (patch)
tree428ba81fa982a4680871013f2452535ad85bc320 /include/login.php
parentd0720e088954dd4028037bbb9aeeca29ab4c47ac (diff)
downloade-DoKo-1c3c341f53ce5de7e9d4bcc63e43a925faec3f48.tar.gz
e-DoKo-1c3c341f53ce5de7e9d4bcc63e43a925faec3f48.tar.bz2
e-DoKo-1c3c341f53ce5de7e9d4bcc63e43a925faec3f48.zip
CLEANUP: some more comments, also removed some debug messages
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/login.php')
-rw-r--r--include/login.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/login.php b/include/login.php
index 346c71e..ea8d8ef 100644
--- a/include/login.php
+++ b/include/login.php
@@ -1,13 +1,14 @@
<?php
-/* make sure that we are not called from outside the scripts,
+/* make sure that we are not called from outside the scripts,
* use a variable defined in config.php to check this
*/
if(!isset($HOST))
exit;
+/* check if login information is present */
if(!myisset("email","password"))
{
- "can't log you in";
+ echo "can't log you in... missing login information.";
}
else
{
@@ -17,15 +18,15 @@ else
/* verify password and email */
if(strlen($password)!=32)
$password = md5($password);
-
+
$ok = 1;
$myid = DB_get_userid('email-password',$email,$password);
if(!$myid)
$ok = 0;
-
+
if($ok)
{
- /* user information is ok */
+ /* user information is ok, set session variabel */
$myname = DB_get_name('email',$email);
$_SESSION["name"] = $myname;
}