예제 #1
0
 /**
  * 执行函数
  *
  * @access public
  * @return void
  */
 public function execute()
 {
     if ($this->hasLogin()) {
         $rows = $this->db->fetchAll($this->db->select()->from('table.options')->where('user = ?', $this->_user['uid']));
         $this->push($this->_user);
         foreach ($rows as $row) {
             $this->options->__set($row['name'], $row['value']);
         }
         //更新最后活动时间
         $this->db->query($this->db->update('table.users')->rows(array('activated' => $this->options->gmtTime))->where('uid = ?', $this->_user['uid']));
     }
 }