How to automatically log out if the user is idle for a certain period of time on yii2How to get users of a specefic role in Yii2 and DbManager?How to automatically delete file from runtime in Yii2 that isn't being used for current runtime?Can we use varnish cache with YII2Trying to migrate SQL commands from plain PHP using Yii2How to Insert data automatically in Yii2?How to change current user in Yii2How to refresh kartik grid view periodically in yii2Override User afterLogin MethodAutomatic Logout after 5 minutes of inactive in yii2How to change language automatically using user browser language Yii2?
Why isn't there research to build a standard lunar, or Martian mobility platform?
US Civil War story: man hanged from a bridge
Can a Beast Master ranger have its beast chase down and attack enemies?
How to ask for a LinkedIn endorsement?
Are neural networks prone to catastrophic forgetting?
Why weren't bootable game disks ever common on the IBM PC?
Why are Hobbits so fond of mushrooms?
Why did Harry Potter get a bedroom?
Using Newton's shell theorem to accelerate a spaceship
Why can a destructor change the state of a constant object?
If a non-friend comes across my Steam Wishlist, how easily can he gift me one of the games?
Integer Lists of Noah
QGIS Zanzibar how to crop?
Do you know your 'KVZ's?
How can I get a player to accept that they should stop trying to pull stunts without thinking them through first?
What is this triple-transistor arrangement called?
Why are all my yellow 2V/20mA LEDs burning out with 330k Ohm resistor?
Why isn't pressure filtration popular compared to vacuum filtration?
Received a dinner invitation through my employer's email, is it ok to attend?
Why do players in the past play much longer tournaments than today's top players?
How would my creatures handle groups without a strong concept of numbers?
Can fluent English speakers distinguish “steel”, “still” and “steal”?
Why doesn't sea level show seasonality?
Cops: The Hidden OEIS Substring
How to automatically log out if the user is idle for a certain period of time on yii2
How to get users of a specefic role in Yii2 and DbManager?How to automatically delete file from runtime in Yii2 that isn't being used for current runtime?Can we use varnish cache with YII2Trying to migrate SQL commands from plain PHP using Yii2How to Insert data automatically in Yii2?How to change current user in Yii2How to refresh kartik grid view periodically in yii2Override User afterLogin MethodAutomatic Logout after 5 minutes of inactive in yii2How to change language automatically using user browser language Yii2?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have given the task to introduce automatically logout feature in the webstie using Yii2 framework. I am new, please if anyone can guide me
yii2
add a comment |
I have given the task to introduce automatically logout feature in the webstie using Yii2 framework. I am new, please if anyone can guide me
yii2
1
add your config, this should be the default behavior but you need to add the config file
– Muhammad Omer Aslam
Mar 26 at 15:08
add a comment |
I have given the task to introduce automatically logout feature in the webstie using Yii2 framework. I am new, please if anyone can guide me
yii2
I have given the task to introduce automatically logout feature in the webstie using Yii2 framework. I am new, please if anyone can guide me
yii2
yii2
asked Mar 26 at 1:59
SibghatSibghat
32 bronze badges
32 bronze badges
1
add your config, this should be the default behavior but you need to add the config file
– Muhammad Omer Aslam
Mar 26 at 15:08
add a comment |
1
add your config, this should be the default behavior but you need to add the config file
– Muhammad Omer Aslam
Mar 26 at 15:08
1
1
add your config, this should be the default behavior but you need to add the config file
– Muhammad Omer Aslam
Mar 26 at 15:08
add your config, this should be the default behavior but you need to add the config file
– Muhammad Omer Aslam
Mar 26 at 15:08
add a comment |
1 Answer
1
active
oldest
votes
You can set authTimeout property in user components config
'user' => [
'class' => 'yiiwebUser',
'authTimeout' => 3600
],
above code will automatically logout user after 1 hour.
Thank you for the reply
– Sibghat
Apr 22 at 4:10
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348807%2fhow-to-automatically-log-out-if-the-user-is-idle-for-a-certain-period-of-time-on%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can set authTimeout property in user components config
'user' => [
'class' => 'yiiwebUser',
'authTimeout' => 3600
],
above code will automatically logout user after 1 hour.
Thank you for the reply
– Sibghat
Apr 22 at 4:10
add a comment |
You can set authTimeout property in user components config
'user' => [
'class' => 'yiiwebUser',
'authTimeout' => 3600
],
above code will automatically logout user after 1 hour.
Thank you for the reply
– Sibghat
Apr 22 at 4:10
add a comment |
You can set authTimeout property in user components config
'user' => [
'class' => 'yiiwebUser',
'authTimeout' => 3600
],
above code will automatically logout user after 1 hour.
You can set authTimeout property in user components config
'user' => [
'class' => 'yiiwebUser',
'authTimeout' => 3600
],
above code will automatically logout user after 1 hour.
answered Apr 1 at 15:32


Ava DarabiAva Darabi
634 bronze badges
634 bronze badges
Thank you for the reply
– Sibghat
Apr 22 at 4:10
add a comment |
Thank you for the reply
– Sibghat
Apr 22 at 4:10
Thank you for the reply
– Sibghat
Apr 22 at 4:10
Thank you for the reply
– Sibghat
Apr 22 at 4:10
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348807%2fhow-to-automatically-log-out-if-the-user-is-idle-for-a-certain-period-of-time-on%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
add your config, this should be the default behavior but you need to add the config file
– Muhammad Omer Aslam
Mar 26 at 15:08