Automatically redirect to index.cgi if the user is already logged in and loads login.cgi rather then giving an error.

This commit is contained in:
zach%zachlipton.com 2006-08-03 23:51:01 +00:00
Родитель 0811e566e2
Коммит d6829d3d15
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -35,11 +35,17 @@ use Litmus::Auth;
Litmus->init();
use CGI;
my $title = "Log in";
Litmus::Auth::requireLogin("index.cgi");
# if we end up here, it means the user was already logged in
# for some reason, so we should send a redirect to index.cgi:
print Litmus->cgi()->start_html(-title=>'Please Wait',
-head=>Litmus->cgi()->meta({-http_equiv=> 'refresh', -content=>'0;url=index.cgi'})
);
print Litmus->cgi()->end_html();
exit;