public function GetUserById($oUserId) { if (is_object($oUserId)) { $nUserId = $oUserId->getId(); } else { $nUserId = intval($oUserId); } $sCacheKey = 'user_' . $nUserId; if (($data = $this->Cache_Get($sCacheKey)) === false or strpos(get_class($data), 'PluginAceadminpanel_') === false) { $data = $this->oMapper->GetUserById($nUserId); if ($data) { $oSession = $this->User_GetSessionByUserId($data->GetId()); if ($oSession) { $data->setSession($oSession); } else { $data->setSession(null); } } $this->Cache_Set($data, $sCacheKey, array('user_update_' . $nUserId), 60 * 5); } return $data; }