aboutsummaryrefslogtreecommitdiff
path: root/www/logged_in_p.pl
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2014-05-04 18:35:10 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2014-05-04 18:35:10 +0200
commitd8907f11f5c255727b8a814746a0114e5c62e30a (patch)
tree96b1b1e2531a3043e9ab31e66abdd72507136b1d /www/logged_in_p.pl
parent36fafa2ae962d6844b6e20ffbbac92ecf36a059d (diff)
Support Google Apps authentication.
Diffstat (limited to 'www/logged_in_p.pl')
-rwxr-xr-xwww/logged_in_p.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/www/logged_in_p.pl b/www/logged_in_p.pl
index 2e648fc..73c9d1c 100755
--- a/www/logged_in_p.pl
+++ b/www/logged_in_p.pl
@@ -4,6 +4,7 @@
use common::sense;
use Modern::Perl;
+use syntax 'junction';
use JSON;
@@ -35,7 +36,7 @@ while (my $cgi = new CGI::Fast) {
my $email = $cgi->param('email') or die "No email address supplied";
my $session_user = $session->param('user');
- if ($session_user ~~ [email_users($email)]) {
+ if (any(email_users($email)) eq $session_user) {
say encode_json({logged_in_p => 1});
} else {
say encode_json({logged_in_p => 0});