aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Catalyst/Plugin
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-05-24 10:33:05 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-24 10:33:05 +0100
commit72ab2740e2c8c24e62b6e9d98f686498b1225b09 (patch)
tree4e0260c14afbbdcd79ebe66f09aa37d9af509157 /perllib/Catalyst/Plugin
parentda305260b4db386af9fb2c48d9055a2934069c84 (diff)
parentec4fb8fe445efd5cb584ac7021707c41a0188cdb (diff)
Merge branch 'user-inactivity'
Diffstat (limited to 'perllib/Catalyst/Plugin')
-rw-r--r--perllib/Catalyst/Plugin/FixMyStreet/Session/StoreSessions.pm2
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;
}
};