Exemplo n.º 1
0
 protected function getUserObject()
 {
     switch ($this->mode) {
         case self::M_CLIENT:
             return Current_Client::getInstance();
         case self::M_USER:
         default:
             return Current_User::getInstance();
     }
 }
Exemplo n.º 2
0
 public function login()
 {
     $cu = Current_User::getInstance();
     $cu->setUserID($this->ID);
     $dbh = Project_DB::get();
     $query = "UPDATE users SET LastLogin=CURRENT_TIMESTAMP";
     $dbh->exec($query);
 }