示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 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;
 }