public function configure()
 {
     $this->unsetTimestampable();
     if (!$this->getCurrentUser()->isSuperAdmin()) {
         $this->setDefault('staff_id', Staff::loggedIn());
     }
 }
Пример #2
0
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
 public function executeIndex(sfWebRequest $request)
 {
     if ($this->getUser()->isStaff()) {
         $this->staff = Staff::loggedIn();
     } else {
         $this->client = Client::loggedIn();
     }
 }