示例#1
0
 /**
  * Login audit method to keep track of logged in/ logout user detail as history
  * @param string $action 
  * @param integer $iduser 
  */
 public function do_login_audit($action = "Login", $iduser = "")
 {
     if ($iduser == "") {
         $iduser = $_SESSION["do_user"]->iduser;
     }
     $this->addNew();
     $this->action_date = date("Y-m-d H:i:s");
     $this->ip_address = CommonUtils::get_user_ip_address();
     $this->action = $action;
     $this->iduser = $iduser;
     $this->add();
 }