+ when ('status') {
+ my $username = validate_authentication($q);
+ if (!defined $username) {
+ print_403;
+ next REQUEST;
+ }
+
+ my $email = undef;
+ my $email_conf_path = Blerg::Database::configuration->{data_path} . "/$username/email";
+ if (-f $email_conf_path) {
+ open CONF, $email_conf_path;
+ $email = <CONF>;
+ close CONF;
+ }
+
+ say header(-type => 'application/json'),
+ JSON->new->utf8->encode({email => $email});
+ }