Skip to content

Commit

Permalink
Adicionando o session cookie lifetime no authTimeout do sistema (#875)
Browse files Browse the repository at this point in the history
Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br>
  • Loading branch information
Gusta-Santos and TI GUSTAVO authored Nov 21, 2024
1 parent 5fa7e6b commit 9be44af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public function init()

$authTimeout = Yii::app()->user->getState("authTimeout", 5*60*60); // Valor padrão de 1800 segundos (30 minutos)
Yii::app()->user->authTimeout = $authTimeout;
ini_set('session.gc_maxlifetime', $authTimeout);
ini_set('session.gc_maxlifetime', value: $authTimeout);
ini_set('session.cookie_lifetime', $authTimeout);

Yii::app()->sentry->setUserContext([
'id' => Yii::app()->user->loginInfos->id,
Expand Down

0 comments on commit 9be44af

Please sign in to comment.