version 1.8, 2006/06/02 21:43:52
|
version 1.12, 2007/10/01 21:52:50
|
Line 55 sub sso_check {
|
Line 55 sub sso_check {
|
if ($data->{'sso.login'}) { |
if ($data->{'sso.login'}) { |
$extra_env{'request.sso.login'} = $data->{'sso.login'}; |
$extra_env{'request.sso.login'} = $data->{'sso.login'}; |
} |
} |
|
if ($data->{'sso.reloginserver'}) { |
|
$extra_env{'request.sso.reloginserver'} = |
|
$data->{'sso.reloginserver'}; |
|
} |
return \%extra_env; |
return \%extra_env; |
} |
} |
|
|
Line 83 sub handler {
|
Line 87 sub handler {
|
my $extra_env = &sso_check(\%data); |
my $extra_env = &sso_check(\%data); |
|
|
if (!$data{'role'}) { |
if (!$data{'role'}) { |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'}, |
my $handle = &Apache::lonnet::check_for_valid_session($r); |
$home,'/adm/roles',\$extra_env); |
if ($handle) { |
|
&Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'), |
|
$handle); |
|
if ($env{'request.course.id'}) { |
|
$r->internal_redirect('/adm/navmaps'); |
|
} else { |
|
$r->internal_redirect('/adm/roles'); |
|
} |
|
} else { |
|
&Apache::lonauth::success($r,$data{'username'},$data{'domain'}, |
|
$home,'/adm/roles',$extra_env); |
|
|
|
} |
return OK; |
return OK; |
|
|
} |
} |
|
|
my $next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1'; |
my $next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1'; |
|
|
|
|
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home, |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home, |
$next_url,\$extra_env); |
$next_url,$extra_env); |
return OK; |
return OK; |
} |
} |
|
|