--- loncom/auth/migrateuser.pm 2013/09/29 13:07:25 1.19
+++ loncom/auth/migrateuser.pm 2014/10/04 02:59:32 1.21
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Starts a user off based of an existing token.
#
-# $Id: migrateuser.pm,v 1.19 2013/09/29 13:07:25 raeburn Exp $
+# $Id: migrateuser.pm,v 1.21 2014/10/04 02:59:32 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -77,6 +77,11 @@ sub ip_changed {
my $rule_in_effect;
if ($frombalancer) {
my $balancerdom = &Apache::lonnet::host_domain($dataref->{'server'});
+ if ($dataref->{'sso.login'}) {
+ if (&Apache::lonnet::domain($dataref->{'domain'})) {
+ $balancerdom = $dataref->{'domain'};
+ }
+ }
my ($result,$cached)=&Apache::lonnet::is_cached_new('loadbalancing',$balancerdom);
unless (defined($cached)) {
my $cachetime = 60*60*24;
@@ -140,10 +145,10 @@ sub ip_changed {
}
}
if ($dataref->{'sso.login'}) {
- $url .= '/adm/roles?';
+ $url .= '/adm/roles';
} else {
- $url .= '/adm/login?';
- $message .= '
'.&mt('You will need to provide your password one more time');
+ $url .= '/adm/login';
+ $message .= '
'.&mt('You will need to provide your password one more time.');
}
my %info= (
'domain' => $dataref->{'domain'},
@@ -159,7 +164,7 @@ sub ip_changed {
}
my $iptoken = &Apache::lonnet::tmpput(\%info,$switchto);
unless ($iptoken eq 'conlost') {
- $url .= 'iptoken='.$iptoken;
+ $url .= '?iptoken='.$iptoken;
}
$r->print(&Apache::loncommon::start_page($title,undef,
{'redirect' =>
@@ -206,6 +211,9 @@ sub handler {
if ($data{'symb'} ne '') {
$form{'symb'} = $data{'symb'};
}
+ if ($data{'iptoken'} ne '') {
+ $form{'iptoken'} = $data{'iptoken'};
+ }
if (!$data{'role'}) {
my $handle = &Apache::lonnet::check_for_valid_session($r);