public function init() { if (!$this->session->get('_h1cms_user', false)) { Redirect::action('system/login')->send(); exit; } Config::set('view.default', 'default'); }
public static function checkToken($fixValue = NULL, $isFlash = false) { $salt = app()->get('session')->get('security.csrf.slat'); $token = app()->get('session')->get('security.csrf.token'); if ($isFlash) { app()->get('session')->remove('security.csrf.slat'); app()->get('session')->remove('security.csrf.token'); } return hash('sha1', Config::get('security.key', 'h1cms') . $fixValue . $salt) == $token; }
public function beforeAction() { parent::beforeAction(); Config::set('view.default', 'default'); }