示例#1
0
 protected function _execute(CM_Params $params)
 {
     $user = $params->getUser('user');
     if (null === CM_Model_StreamChannel_Message_User::findByUser($user)) {
         $user->setOnline(false);
     }
 }
示例#2
0
文件: SendJob.php 项目: cargomedia/cm
 protected function _execute(CM_Params $params)
 {
     CM_Service_Manager::getInstance()->getMailer()->send($params->getMailMessage('message'));
     if ($params->has('recipient') && $params->has('mailType')) {
         $recipient = $params->getUser('recipient');
         $mailType = $params->getInt('mailType');
         $action = new CM_Action_Email(CM_Action_Abstract::SEND, $recipient, $mailType);
         $action->prepare($recipient);
         $action->notify($recipient);
     }
 }