mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-06-08 05:25:30 +02:00
19 lines
488 B
PHP
19 lines
488 B
PHP
<?php
|
|
|
|
namespace Auth;
|
|
|
|
require_once __DIR__."/Abstract.php";
|
|
|
|
class Basic extends AuthAbstract
|
|
{
|
|
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);
|
|
}
|
|
} |