forked from science-ation/science-ation
Cannot check for valid password when authenticating, because people might have passwords that dont match the "new" requirements
Also simplify some of the code (why bother assigning temp vars just to compare?)
This commit is contained in:
parent
25de3ace41
commit
93011c9883
@ -30,13 +30,16 @@
|
|||||||
{
|
{
|
||||||
/* Ensure sanity of inputs, user should be an email address, but it's stored
|
/* Ensure sanity of inputs, user should be an email address, but it's stored
|
||||||
* in the username field */
|
* in the username field */
|
||||||
$x = isEmailAddress($user);
|
if(!isEmailAddress($user)) {
|
||||||
if($x == false) {
|
|
||||||
/* It's possible that it's a username */
|
/* It's possible that it's a username */
|
||||||
if(user_valid_user($user) == false) return false;
|
if(!user_valid_user($user)) return false;
|
||||||
}
|
}
|
||||||
$x = user_valid_password($pass);
|
|
||||||
if($x == false) return false;
|
//we cannot check for a valid_password here, because converted users dont enforce password length of 6 which user_valid_password does.
|
||||||
|
//all we can do is check if its a length >0
|
||||||
|
//$x = user_valid_password($pass);
|
||||||
|
if(!strlen($pass))
|
||||||
|
return false;
|
||||||
|
|
||||||
$q = mysql_query("SELECT id,username,password
|
$q = mysql_query("SELECT id,username,password
|
||||||
FROM users
|
FROM users
|
||||||
|
Loading…
x
Reference in New Issue
Block a user