[LON-CAPA-cvs] cvs: loncom /auth migrateuser.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 02 Jun 2006 21:43:52 -0000
albertel Fri Jun 2 17:43:52 2006 EDT
Modified files:
/loncom/auth migrateuser.pm
Log:
- request.sso.login really really really gets set now on ssoed login
Index: loncom/auth/migrateuser.pm
diff -u loncom/auth/migrateuser.pm:1.7 loncom/auth/migrateuser.pm:1.8
--- loncom/auth/migrateuser.pm:1.7 Fri Jun 2 15:38:21 2006
+++ loncom/auth/migrateuser.pm Fri Jun 2 17:43:52 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Starts a user off based of an existing token.
#
-# $Id: migrateuser.pm,v 1.7 2006/06/02 19:38:21 albertel Exp $
+# $Id: migrateuser.pm,v 1.8 2006/06/02 21:43:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -51,10 +51,11 @@
sub sso_check {
my ($data) = @_;
+ my %extra_env;
if ($data->{'sso.login'}) {
- &Apache::lonnet::appenv(('request.sso.login' =>
- $data->{'sso.login'} ));
+ $extra_env{'request.sso.login'} = $data->{'sso.login'};
}
+ return \%extra_env;
}
sub handler {
@@ -79,10 +80,11 @@
my $home=&Apache::lonnet::homeserver($data{'username'},$data{'domain'});
if ($home =~ /(con_lost|no_such_host)/) { return &goto_login($r); }
+ my $extra_env = &sso_check(\%data);
+
if (!$data{'role'}) {
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},
- $home,'/adm/roles');
- &sso_check(\%data);
+ $home,'/adm/roles',\$extra_env);
return OK;
}
@@ -90,8 +92,7 @@
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home,
- $next_url);
- &sso_check(\%data);
+ $next_url,\$extra_env);
return OK;
}