version 1.41, 2017/10/02 16:40:18
|
version 1.43, 2019/02/08 19:57:29
|
Line 412 sub invalid_state {
|
Line 412 sub invalid_state {
|
|
|
sub homeserver_redirect { |
sub homeserver_redirect { |
my ($uname,$udom,$domdesc,$brcrum) = @_; |
my ($uname,$udom,$domdesc,$brcrum) = @_; |
my $uhome = &Apache::lonnet::homeserver(); |
my $uhome; |
if ($uhome eq 'no_host') { |
if (($uname ne '') && ($udom ne '')) { |
|
$uhome = &Apache::lonnet::homeserver($uname,$udom); |
|
} |
|
if (($uhome eq 'no_host') || ($uhome eq '')) { |
$uhome = &Apache::lonnet::domain($udom,'primary'); |
$uhome = &Apache::lonnet::domain($udom,'primary'); |
} |
} |
|
my $hostname = &Apache::lonnet::hostname($uhome); |
my $protocol = $Apache::lonnet::protocol{$uhome}; |
my $protocol = $Apache::lonnet::protocol{$uhome}; |
$protocol = 'http' if ($protocol ne 'https'); |
$protocol = 'http' if ($protocol ne 'https'); |
my $url = $protocol.'://'.&Apache::lonnet::hostname($uhome).'/adm/resetpw'; |
my $url = $protocol.'://'.$hostname.'/adm/resetpw'; |
# Breadcrumbs |
# Breadcrumbs |
my $start_page = &Apache::loncommon::start_page('Switching Server',undef, |
my $start_page = &Apache::loncommon::start_page('Switching Server',undef, |
{'redirect' => [0,$url], |
{'redirect' => [0,$url], |
Line 494 sub reset_passwd {
|
Line 498 sub reset_passwd {
|
if ($homeserver eq 'no_host') { |
if ($homeserver eq 'no_host') { |
$r->print(&generic_failure_msg($contact_name,$contact_email)); |
$r->print(&generic_failure_msg($contact_name,$contact_email)); |
} else { |
} else { |
|
my $hostname = &Apache::lonnet::hostname($homeserver); |
my $protocol = $Apache::lonnet::protocol{$homeserver}; |
my $protocol = $Apache::lonnet::protocol{$homeserver}; |
$protocol = 'http' if ($protocol ne 'https'); |
$protocol = 'http' if ($protocol ne 'https'); |
my $url = $protocol.'://'.&Apache::lonnet::hostname($homeserver). |
my $url = $protocol.'://'.$hostname.'/adm/resetpw'; |
'/adm/resetpw'; |
|
my ($opentag,$closetag); |
my ($opentag,$closetag); |
if ($url) { |
if ($url) { |
$opentag = '<a href="'.$url.'">'; |
$opentag = '<a href="'.$url.'">'; |