version 1.68, 2005/08/30 21:14:20
|
version 1.70, 2005/11/23 20:58:31
|
Line 60 sub handler {
|
Line 60 sub handler {
|
my $handle=$lonid->value; |
my $handle=$lonid->value; |
$handle=~s/\W//g; |
$handle=~s/\W//g; |
my $lonidsdir=$r->dir_config('lonIDsDir'); |
my $lonidsdir=$r->dir_config('lonIDsDir'); |
if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) { |
if (-e "$lonidsdir/$handle.id") { |
|
# Is there an existing token file? |
|
if ($handle=~/^publicuser\_/) { |
|
# For "public user" - remove it, we apparently really want to login |
|
unlink("$lonidsdir/$handle.id"); |
|
} elsif ($handle ne '') { |
# Indeed, a valid token is found |
# Indeed, a valid token is found |
my $bodytag=&Apache::loncommon::bodytag('Already logged in'); |
my $bodytag=&Apache::loncommon::bodytag('Already logged in'); |
$r->print(<<ENDFAILED); |
$r->print(<<ENDFAILED); |
<html> |
<html> |
<head> |
<head> |
<title>Already logged in</title> |
<title>Already logged in</title> |
Line 77 $bodytag
|
Line 82 $bodytag
|
</body> |
</body> |
</html> |
</html> |
ENDFAILED |
ENDFAILED |
return OK; |
return OK; |
|
} |
} |
} |
} |
} |
|
|
Line 86 ENDFAILED
|
Line 92 ENDFAILED
|
&Apache::loncommon::get_unprocessed_cgi |
&Apache::loncommon::get_unprocessed_cgi |
($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'}, |
($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'}, |
['interface','username','domain','firsturl','localpath','localres']); |
['interface','username','domain','firsturl','localpath','localres']); |
|
|
|
|
|
# ---------------------------- Not possible to really login to domain "public" |
|
if ($env{'form.domain'} eq 'public') { |
|
$env{'form.domain'}=''; |
|
$env{'form.username'}=''; |
|
} |
# ----------------------------------------------------------- Process Interface |
# ----------------------------------------------------------- Process Interface |
$env{'form.interface'}=~s/\W//g; |
$env{'form.interface'}=~s/\W//g; |
|
|