MyBB Community Forums
Is it possible to check username and password in this way? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Is it possible to check username and password in this way? (/thread-218990.html)



Is it possible to check username and password in this way? - Augustino7 - 2018-07-28

Hi

Is it possible to check username and password in this way? doing a cosulta directly in the table mybb_users

	function login($user,$pass){
		global $db;
		$q = $db->simple_select("users", "*", "(username='".$user."' OR email='".$user."') AND password='".md5($pass)."'");	
		if($db->num_rows($q) > 0){
			return true;	
		}else{
			return false;
		}
	}

Best Regards

Sorry I Solved