[phpMP-CVS] CVS: phpMP/includes auth.php,1.2,1.3
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2002-04-05 07:25:02
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv27978/includes Modified Files: auth.php Log Message: Fixed a few problems with invalid logins. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** auth.php 3 Apr 2002 08:47:42 -0000 1.2 --- auth.php 5 Apr 2002 07:24:57 -0000 1.3 *************** *** 52,56 **** function AuthUser() { ! global $MPCONF, $DBA; session_start(); --- 52,56 ---- function AuthUser() { ! global $MPCONF, $DBA, $HTTP_POST_VARS; session_start(); *************** *** 77,86 **** } ! } elseif(($username != "") && ($password != "")) { $enc_password = md5($password); ! $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='$username' AND password='$password'"); if(@mysql_num_rows($result) == 1) { ! $sess_user = $username; session_register("$sess_user"); --- 77,86 ---- } ! } elseif(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { $enc_password = md5($password); ! $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='{$HTTP_POST_VARS['username']}' AND password='$enc_password'"); if(@mysql_num_rows($result) == 1) { ! $sess_user = $HTTP_POST_VARS['username']; session_register("$sess_user"); |