function checkLogin($user, $pass) { $Frontend = new FrontEnd(); $pass = $Frontend->encryptPassword($pass); $dbuser = new Lan_users(); $dbuser->username = $dbuser->escape($user); $dbuser->password = $pass; $dbuser->find(); if (0 == $dbuser->count()) { return null; } $dbuser->fetch(); return $dbuser; }
function CheckLogin($user, $pass) { $Frontend = new FrontEnd(); //Manually pull updated info $uid = $Frontend->findUserID($user); if (streq($uid, '0')) { return false; } $Frontend->pullUserInfo($uid); $dbuser = new Lan_users(); $dbuser->username = $dbuser->escape($user); $dbuser->password = $pass; $dbuser->find(); return 0 != $dbuser->count(); }