autodisconnect

This commit is contained in:
Fred Tempez 2021-10-30 18:48:33 +02:00
parent 0535dc951b
commit 3d928d866b
3 changed files with 3 additions and 3 deletions

View File

@ -2402,7 +2402,7 @@ class core extends common {
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND ( $this->getUser('group') === self::GROUP_BANNED
OR ( $_SESSION['csrf'] !== $this->getData(['user',$this->getUser('id'),'accessCsrf'])
AND $this->getData(['config','autoDisconnect']) === true)
AND $this->getData(['config','connect', 'autoDisconnect']) === true)
)
) {
$user = new user;

View File

@ -399,7 +399,7 @@ class config extends common {
}
// Eviter déconnexion automatique après son activation
if ( $this->getData(['config','autoDisconnect']) === false
if ( $this->getData(['config','connect', 'autoDisconnect']) === false
AND $this->getInput('configAutoDisconnect',helper::FILTER_BOOLEAN) === true ) {
$this->setData(['user',$this->getuser('id'),'accessCsrf',$_SESSION['csrf']]);
}

View File

@ -17,7 +17,7 @@
</div>
<div class="col4">
<?php echo template::checkbox('connectAutoDisconnect', true, 'Déconnexion automatique', [
'checked' => $this->getData(['config','autoDisconnect']),
'checked' => $this->getData(['config','connect', 'autoDisconnect']),
'help' => 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.'
]); ?>
</div>