Main Page | Directories | File List | File Members

verify.php File Reference

Go to the source code of this file.

Functions

 verify_login_valid ()


Function Documentation

verify_login_valid  ) 
 

Definition at line 32 of file verify.php.

References $GLOBALS, $res, db_fetch_array(), db_numrows(), db_query(), and session_login_valid().

00033 {
00034         global $HTTP_POST_VARS;
00035 
00036         if (!$GLOBALS['form_loginname']) return 0;
00037 
00038         # first check just confirmation hash
00039         $res = db_query('SELECT confirm_hash,status FROM user WHERE '
00040                 .'user_name=\''.$GLOBALS['form_loginname'].'\'');
00041 
00042         if (db_numrows($res) < 1) {
00043                 $GLOBALS['error_msg'] = _("Invalid username.");
00044                 return 0;
00045         }
00046         $usr = db_fetch_array($res);
00047 
00048         if (strcmp($GLOBALS['confirm_hash'],$usr['confirm_hash'])) {
00049                 $GLOBALS['error_msg'] = _("Invalid confirmation hash.");
00050                 return 0;
00051         }
00052 
00053         # then check valid login        
00054         return (session_login_valid($GLOBALS['form_loginname'],$GLOBALS['form_pw'],1));
00055 }


Generated on Sun Feb 26 13:23:05 2006 for Savane PHP Frontend Developer Reference by  doxygen 1.4.4