Exemplo n.º 1
0
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setMinUserLevelRequired(PSM_USER_ANONYMOUS);
     $this->setActions(array('login', 'forgot', 'reset'), 'login');
     $this->addMenu(false);
 }
Exemplo n.º 2
0
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setMinUserLevelRequired(PSM_USER_ADMIN);
     $this->setCSRFKey('config');
     $this->setActions(array('index', 'save'), 'index');
 }
Exemplo n.º 3
0
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setMinUserLevelRequired(PSM_USER_ADMIN);
     $this->setActions(array('index', 'edit', 'delete', 'save'), 'index');
     $this->twig->addGlobal('subtitle', psm_get_lang('menu', 'user'));
 }
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setMinUserLevelRequired(PSM_USER_ANONYMOUS);
     $this->addMenu(false);
     $this->path_config = PSM_PATH_SRC . '../config.php';
     $this->path_config_old = PSM_PATH_SRC . '../config.inc.php';
     $this->setActions(array('index', 'config', 'install'), 'index');
     $this->twig->addGlobal('subtitle', psm_get_lang('system,', 'install'));
 }
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setMinUserLevelRequired(PSM_USER_ADMIN);
     $this->setActions(array('index', 'edit', 'delete', 'save'), 'index');
     $this->twig->addGlobal('subtitle', psm_get_lang('menu', 'user'));
     $this->twig->addFunction(new \Twig_SimpleFunction('form_token', function ($lock_to = null) {
         if (empty($_SESSION['token'])) {
             $_SESSION['token'] = bin2hex(random_bytes(32));
         }
         if (empty($_SESSION['token2'])) {
             $_SESSION['token2'] = random_bytes(32);
         }
         if (empty($lock_to)) {
             return $_SESSION['token'];
         }
         return hash_hmac('sha256', $lock_to, $_SESSION['token2']);
     }));
 }
Exemplo n.º 6
0
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setActions('index', 'index');
 }
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setMinUserLevelRequired(PSM_USER_ANONYMOUS);
     $this->setActions(array('401'), '401');
 }
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
 }
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setActions(array('index', 'save'), 'index');
     $this->setCSRFKey('profile');
 }