Example #1
0
 /**
  * Before filter callback.
  *
  * @return void
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $userId = $this->Auth->user('id');
     $isUpdateLastAction = $this->Cookie->check($this->_cookieName);
     if ($userId && !$isUpdateLastAction) {
         $this->_setCookieOptions($userId);
         $this->_updateLastAction($userId);
     }
 }