30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
parent::__construct(DB::getInstance(), [
'cookie_domain' => $url['host'],
'cookie_path' => preg_replace('!/admin/$!', '/', $url['path']),
'cookie_secure' => (\Garradin\PREFER_HTTPS >= 2) ? true : false,
]);
}
protected function getUserForLogin($login)
{
$champ_id = Config::getInstance()->get('champ_identifiant');
// Ne renvoie un membre que si celui-ci a le droit de se connecter
$query = 'SELECT m.id, m.%1$s AS login, m.passe AS password, m.secret_otp AS otp_secret
|
>
>
>
>
>
>
>
>
>
>
>
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
parent::__construct(DB::getInstance(), [
'cookie_domain' => $url['host'],
'cookie_path' => preg_replace('!/admin/$!', '/', $url['path']),
'cookie_secure' => (\Garradin\PREFER_HTTPS >= 2) ? true : false,
]);
}
/**
* Suppression anciens cookies qui avaient un chemin incorrect
* FIXME supprimer en 2019
* @return void
*/
public function cleanOldCookies()
{
setcookie($this->cookie_name, null, -1, '/admin/', $this->cookie_domain, $this->cookie_secure, true);
setcookie($this->remember_me_cookie_name, null, -1, '/admin/', $this->cookie_domain, $this->cookie_secure, true);
}
protected function getUserForLogin($login)
{
$champ_id = Config::getInstance()->get('champ_identifiant');
// Ne renvoie un membre que si celui-ci a le droit de se connecter
$query = 'SELECT m.id, m.%1$s AS login, m.passe AS password, m.secret_otp AS otp_secret
|