示例#1
0
 public function close()
 {
     $messageId = $this->route_vars['id'];
     $loginMessage = new LoginMessage($messageId);
     $loginMessage->acknowledgeMessage($this->model->getLoggedInMember());
     $redirect = $_SERVER['HTTP_REFERER'];
     if (empty($redirect)) {
         $redirect = PVars::getObj('env')->baseuri . '/';
     } else {
         // don't redirect infinitely
         if (strpos($redirect, '/close/') !== false) {
             $redirect = PVars::getObj('env')->baseuri . '/';
         }
     }
     $this->redirectAbsolute($redirect);
 }
示例#2
0
 protected function _getLoginMessages()
 {
     $model = new RoxModelBase();
     $member = $model->getLoggedInMember();
     if ($member) {
         $loginMessage = new LoginMessage();
         return $loginMessage->getLatestLoginMessages($member);
     } else {
         return false;
     }
 }