MyBB Community Forums

Full Version: Is it possible to check username and password in this way?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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