зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
0811e566e2
Коммит
d6829d3d15
|
@ -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;
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче