Пример #1
0
 /**
  * check_tokens - Check md5 hash token for form validation
  */
 public function check_tokens(&$cookie, &$user)
 {
     if ($this->get('action') == 'save' && !$user->getBypass()) {
         return LhpBrowser::getRequestMethod() == 'post' && ($cookie->get('SESSIONID') !== null && $this->get('token') == md5(LhpBrowser::getUserAgent() . FORM_KEY . $cookie->get('SESSIONID') . $this->get('token_hash')) || $user->getBypass());
     } else {
         return true;
     }
 }