示例#1
0
 public function __construct($options = null)
 {
     $oModelUser = new Admin_Model_User();
     $oChatUserRecipients = $oModelUser->findAskRecipients();
     if (isset($oChatUserRecipients)) {
         foreach ($oChatUserRecipients as $oRow) {
             $this->_aChatUserRecipients[$oRow->id] = trim($oRow->first_name . " " . $oRow->last_name);
         }
     }
     $oOnlineChatUserRecipients = $oModelUser->findAskOnline();
     if (isset($oOnlineChatUserRecipients)) {
         foreach ($oOnlineChatUserRecipients as $oRow) {
             $this->_aOnlineChatUserRecipients[$oRow->id] = $oRow->id;
         }
     }
     parent::__construct($options);
 }
示例#2
0
 public function __construct($options = null)
 {
     $this->_oAuth = AppCms2_Controller_Plugin_ModuleAuth::getInstance();
     $oModelUser = new Admin_Model_User();
     $oModelUserCategory = new Admin_Model_UserCategory();
     if ($this->_oAuth->hasIdentity()) {
         $this->_aUser = $oModelUser->findUser($this->_oAuth->getStorage()->read()->user_id);
     }
     $oChatUserRecipients = $oModelUser->findAskOnline();
     if (isset($oChatUserRecipients)) {
         foreach ($oChatUserRecipients as $oRow) {
             $aUserParam = $oModelUser->findUser($oRow->id);
             $this->_aChatUserRecipients[$oRow->id] = trim($aUserParam["first_name"] . " " . $aUserParam["last_name"]);
         }
     }
     $oAllCategory = $oModelUserCategory->getAll();
     if (isset($oAllCategory)) {
         foreach ($oAllCategory as $oRow) {
             $this->_aCategory[$oRow->id] = trim($oRow->name);
         }
     }
     parent::__construct($options);
 }