Example #1
0
File: Auth.php Project: phpon/on
 public function recordSession($redirect = FALSE)
 {
     if (!is_null($this->_key)) {
         $obj = $this->_register;
         foreach ($this->_fields as $field) {
             //if (property_exists(get_class($obj),$field)) {
             $user[$field] = Crypt::strCrypt($obj->{$field});
             //}
         }
         $user['ip'] = Crypt::strCrypt(HTTP::ip());
         $user['key'] = Crypt::strCrypt($this->_key);
         $user['user'] = Crypt::strCrypt($this->_user);
         Request::initSess();
         Request::setSess($this->_sessname, $user);
         if ($redirect) {
             HTTP::redirect($this->_homeurl);
         }
         return true;
     } else {
         return false;
     }
 }