2 package SGN
::Controller
::SiteStatus
;
6 BEGIN { extends
'Catalyst::Controller'; }
9 sub login_status
:Path
('/about/status/logins') Args
(0) {
14 $c->res->redirect('/user/login');
17 if (!$c->user()->check_roles("curator")) {
18 $c->stash->{template
} = '/generic_message.mas';
19 $c->stash->{message
} = 'You do not have the required privileges to view this page';
23 my $login = CXGN
::Login
->new($c->dbc->dbh());
25 my %logins = $login->get_login_status();
28 foreach my $user_type (qw
/curator submitter user/){
29 my $count = $logins{$_};
30 $count = 0 if $count eq "none";
31 $summary->{$user_type}=$count;
33 $c->stash->{logins
} = \
%logins;
37 foreach my $user_type (keys %{$logins{detailed
}}) {
39 @usernames = (keys %{$logins{detailed
}->{$user_type}});
44 $c->stash->{usernames
} = \
@usernames;
45 $c->stash->{template
} = '/site/status.mas';