Пример #1
0
 /**
  *  Event AuditLogin
  *  Record in a login table the users login.
  *  This requires an AuditLog object and auditlog table
  * @param EventControler eventcontroler instance
  */
 function eventAuditLogin(EventControler $evtcl)
 {
     if (is_object($_SESSION['AuditLog'])) {
         $_SESSION['AuditLog']->user = $this->{$this->getUsernameField()};
         $_SESSION['AuditLog']->action = "login";
         $_SESSION['AuditLog']->add();
     } else {
         $AuditLog = new AuditLog();
         $AuditLog->init();
         $AuditLog->user = $this->{$this->getUsernameField()};
         $AuditLog->action = "login";
         $AuditLog->object = get_class($this);
         $AuditLog->add();
     }
 }