06-15-2017, 04:43 PM
Even more, I commented the IF lines on User.php like this:
public function find($user = null){
if ($user) {
/*if(is_numeric($user)){
$field = 'id';
}elseif(!filter_var($user, FILTER_VALIDATE_EMAIL) === false){
$field = 'email';
}else{*/
$field = 'username';
//}
So this function assigns $field = 'username' without a doubt. And the behavior is the same, can't log in with any user.
public function find($user = null){
if ($user) {
/*if(is_numeric($user)){
$field = 'id';
}elseif(!filter_var($user, FILTER_VALIDATE_EMAIL) === false){
$field = 'email';
}else{*/
$field = 'username';
//}
So this function assigns $field = 'username' without a doubt. And the behavior is the same, can't log in with any user.