public function __construct(\App\Storage\User $storage) { if (!$this->_username && isset($_SERVER["PHP_AUTH_USER"])) { $this->setUsername($_SERVER["PHP_AUTH_USER"]); } if (!$this->_password && isset($_SERVER["PHP_AUTH_PW"])) { $this->setPassword(sha1($_SERVER["PHP_AUTH_PW"])); } parent::__construct($storage); }
public function __construct(\App\Storage\User $storage) { session_name("lbcalerte"); session_start(); if (isset($_SESSION["lbcauth"])) { if (isset($_SESSION["lbcauth"]["username"])) { $this->_username = $_SESSION["lbcauth"]["username"]; } if (isset($_SESSION["lbcauth"]["password"])) { $this->_password = $_SESSION["lbcauth"]["password"]; } } parent::__construct($storage); }