summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/Auth.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-23 20:05:51 +0100
committerYorhel <git@yorhel.nl>2010-12-23 20:05:51 +0100
commitfd56a6e269aea462a80fff730eccabd4688036e3 (patch)
tree0aefc987bafb835fee825cb0025177266a8640e6 /lib/VNDB/Util/Auth.pm
parent3eb574e4e26162aa754372fff806e4c6de8f4754 (diff)
Store l10n preference in the database for logged-in users
Diffstat (limited to 'lib/VNDB/Util/Auth.pm')
-rw-r--r--lib/VNDB/Util/Auth.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm
index 932a48ee..9ad76894 100644
--- a/lib/VNDB/Util/Auth.pm
+++ b/lib/VNDB/Util/Auth.pm
@@ -70,6 +70,10 @@ sub authLogout {
$self->resRedirect('/', 'temp');
_rmcookie($self);
+
+ # set l10n cookie if the user has a preferred language set
+ my $l10n = $self->authPref('l10n');
+ $self->resHeader('Set-Cookie', "l10n=$l10n; expires=Sat, 01-Jan-2030 00:00:00 GMT; path=/; domain=$self->{cookie_domain}") if $l10n;
}