Not Solved How can I login with phone number?
Not Solved

I need the users can be loged with the username or with a phone number
I added the column "phone" in mybb_users table

But in PHP How can i do?

Can I use the  loginhandler class?

Or is better idea, get the username with the phone
			$query = $db->simple_select("users", "username", "phone = '{$phone}'", array('limit' => 1));
			$usuario=$db->fetch_field($query, 'username');
		// Is a fatal call if user has had too many tries
		$errors = array();
		$logins = login_attempt_check();
		require_once "./../../../";
		$loginhandler = new LoginDataHandler("get");
		$user = array(
			'username' => $usuario,
			'password' => $password,
			'remember' => "yes",
			'imagestring' => ""
		$user_loginattempts = get_user_by_username($user['username'], array('fields' => 'loginattempts'));
		$user['loginattempts'] = (int)$user_loginattempts['loginattempts'];
		$validated = $loginhandler->validate_login();
Best regards
Not Solved

I am aware MyBB allows you to have username/email logins for your users. Do you have a forum link? You can try your own loginhandler class and i can try logging in with a phone number. Honestly, it seems really risky using phone numbers via the forum as a user perspective. Hope someone with experience can help! Smile
Best Regards,

[Image: ppadbanner.gif]
Not Solved
I don't even know where to start with this as I can already see a massive security issues for your users and a lot of people not wanting to submit that information.
Check out all my submissions here - click me
MyBB support at it's finest. 

Forum Jump:

Users browsing this thread: 1 Guest(s)