'userid', 'email' => 'email', 'timezone' => 'timezoneoffset', 'displayname' => 'username' ); // ################################################################### function _setupDatabase() { $this->authDb = new DB_MySQL($this->registry); $this->authDb->connect('VBULLETIN_DATABASE_SERVER', 'VB_DATABASE_USER', 'VB_DATABASE_PASSWORD', 'VBULLETIN_DATABASE_NAME', false); } // ################################################################### function _fetchCookieUniqueId() { return $this->registry->input_clean('bbuserid', TYPE_UINT); } // ################################################################### function _fetchCookiePassword() { return $this->registry->in['bbpassword']; } // ################################################################### function _fetchUserUsingCookies() { return $this->authDb->query_first("SELECT * FROM {$this->vBTablePrefix}user WHERE userid = " . $this->_fetchCookieUniqueId()); } // ################################################################### function _verifyCookieData() { return (md5($this->authUser['password'] . $this->licenseKey) == $this->_fetchCookiePassword()); } // ################################################################### function _setCookies($sticky = false) { $this->registry->funct->cookie('bbuserid', $this->authUser['userid'], $sticky); $this->registry->funct->cookie('bbpassword', md5($this->authUser['password'] . $this->licenseKey), $sticky); } // ################################################################### function clearCookies() { $this->registry->funct->cookie('bbpassword'); $this->registry->funct->cookie('bbuserid'); } // ################################################################### function _fetchUserWithIdentifier($username) { return $this->authDb->query_first("SELECT * FROM {$this->vBTablePrefix}user WHERE username = '" . $this->authDb->escape_string($username) . "'"); } // ################################################################### function _verifyLoginUser($password) { return ($this->authUser['password'] == md5(md5($password) . $this->authUser['salt'])); } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>