function loadInfo() { if ($this->bInfoLoaded) { return; } try { $this->debug("Loading user info..."); $oUser = AnwUsers::getUser($this->nId); $this->sLogin = $oUser->getLogin(); parent::loadInfoFromUser($oUser); } catch (AnwUserNotFoundException $e) { $this->bExists = false; } $this->bInfoLoaded = true; }
private static function getUserFromData($oDataUser) { $nUserId = $oDataUser->UserId; $sUserLogin = $oDataUser->UserLogin; $sUserDisplayName = $oDataUser->UserDisplayName; $sUserEmail = $oDataUser->UserEmail; $sUserLang = $oDataUser->UserLang; $nUserTimezone = $oDataUser->UserTimezone; $oUser = AnwUserReal::rebuildUser($nUserId, $sUserLogin, $sUserDisplayName, $sUserEmail, $sUserLang, $nUserTimezone); return $oUser; }
static function createUser($sLogin, $sDisplayName, $sEmail, $sLang, $nTimezone, $sPassword) { self::debug("Creating user : "******"New user id : " . $nId); $oUser = AnwUserReal::rebuildUser($nId, $sLogin, $sDisplayName, $sEmail, $sLang, $nTimezone); AnwPlugins::hook("user_created", $oUser, $sPassword); return $oUser; }