diff options
author | Marius Halden <marius.h@lden.org> | 2018-06-07 13:28:45 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2018-06-07 13:28:45 +0200 |
commit | 956f8b8a065824f9a9dc379eba1d0aa8b1b669cf (patch) | |
tree | 49f9ccb147b18dddee97500d4df7a3fb3dd3737c /perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm | |
parent | 782457d016084c8de04989dbc824a71899f8b41b (diff) | |
parent | 4dbf5371f79c5f290c08e561ba2c881e96b58669 (diff) |
Merge tag 'v2.3.3' into fiksgatami-dev
Diffstat (limited to 'perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm')
-rw-r--r-- | perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm b/perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm index 5e7a3cede..30149fc2b 100644 --- a/perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm +++ b/perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm @@ -7,6 +7,7 @@ after set_authenticated => sub { my $sessions = $c->user->get_extra_metadata('sessions'); push @$sessions, $c->sessionid; $c->user->set_extra_metadata('sessions', $sessions); + $c->user->set_last_active; $c->user->update; }; @@ -16,6 +17,7 @@ before logout => sub { my $sessions = $user->get_extra_metadata('sessions'); $sessions = [ grep { $_ ne $c->sessionid } @$sessions ]; @$sessions ? $user->set_extra_metadata('sessions', $sessions) : $user->unset_extra_metadata('sessions'); + $user->set_last_active; $user->update; } }; |