10-26-2016, 10:16 PM
Hi.
my name is ruben. and have 1{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d} of knowdledge on programing. i was trying to use a numeric for username and register the form.
but when i try log in. i cant. i notice that if the username is a numeric it try to get it by ID and not for the Username.
-- i can log in whit. username: 1 password: password
<pre></pre>
but i cant log in whit the real numeric, username, can i know a way of login whit another field of the DB or whit a numeric username ?.
my name is ruben. and have 1{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d} of knowdledge on programing. i was trying to use a numeric for username and register the form.
but when i try log in. i cant. i notice that if the username is a numeric it try to get it by ID and not for the Username.
-- i can log in whit. username: 1 password: password
<pre>
Code:
public function find($user = null){
if ($user) {
if(is_numeric($user)){
$field = 'id';
}
else
if(!filter_var($user, FILTER_VALIDATE_EMAIL) === false){
$field = 'email';
}else{
$field = 'username';
}
but i cant log in whit the real numeric, username, can i know a way of login whit another field of the DB or whit a numeric username ?.