public function Authenticate($uid, $pass) { $pwd_hash = ''; $stmt = ulPdoDb::Prepare('auth', 'SELECT password FROM ul_logins WHERE id=?'); if (!ulPdoDb::BindExec($stmt, array(&$pwd_hash, 'str'), array(&$uid, 'int'))) { ul_db_fail(); return ulLoginBackend::BACKEND_ERROR; } if (ulPdoDb::Fetch($stmt) == false) { return ulLoginBackend::NO_SUCH_USER; } if (ulPassword::Verify($pass, $pwd_hash)) { $this->AuthResult = $uid; return true; } else { $this->AuthResult = false; return ulLoginBackend::BAD_CREDENTIALS; } }