version 1.354, 2019/04/22 01:55:17
|
version 1.355, 2019/04/26 20:15:30
|
Line 13960 sub modify_contacts {
|
Line 13960 sub modify_contacts {
|
|
|
sub modify_passwords { |
sub modify_passwords { |
my ($r,$dom,$confname,$lastactref,%domconfig) = @_; |
my ($r,$dom,$confname,$lastactref,%domconfig) = @_; |
my ($resulttext,%current,%changes,%newvalues,@oktypes,$errors,$updatedefaults); |
my ($resulttext,%current,%changes,%newvalues,@oktypes,$errors, |
|
$updatedefaults,$updateconf); |
my $customfn = 'resetpw.html'; |
my $customfn = 'resetpw.html'; |
if (ref($domconfig{'passwords'}) eq 'HASH') { |
if (ref($domconfig{'passwords'}) eq 'HASH') { |
%current = %{$domconfig{'passwords'}}; |
%current = %{$domconfig{'passwords'}}; |
Line 14248 sub modify_passwords {
|
Line 14249 sub modify_passwords {
|
$resulttext = &mt('Changes made: ').'<ul>'; |
$resulttext = &mt('Changes made: ').'<ul>'; |
foreach my $key ('reset','intauth','rules','crsownerchg') { |
foreach my $key ('reset','intauth','rules','crsownerchg') { |
if ($changes{$key}) { |
if ($changes{$key}) { |
|
unless ($key eq 'intauth') { |
|
$updateconf = 1; |
|
} |
$resulttext .= '<li>'.$titles{$key}.':<ul>'; |
$resulttext .= '<li>'.$titles{$key}.':<ul>'; |
if ($key eq 'reset') { |
if ($key eq 'reset') { |
if ($confighash{'passwords'}{'captcha'} eq 'original') { |
if ($confighash{'passwords'}{'captcha'} eq 'original') { |
Line 14394 sub modify_passwords {
|
Line 14398 sub modify_passwords {
|
} else { |
} else { |
$resulttext = &mt('No changes made to password settings'); |
$resulttext = &mt('No changes made to password settings'); |
} |
} |
|
my $cachetime = 24*60*60; |
if ($updatedefaults) { |
if ($updatedefaults) { |
my $cachetime = 24*60*60; |
|
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
if (ref($lastactref) eq 'HASH') { |
if (ref($lastactref) eq 'HASH') { |
$lastactref->{'domdefaults'} = 1; |
$lastactref->{'domdefaults'} = 1; |
} |
} |
} |
} |
|
if ($updateconf) { |
|
&Apache::lonnet::do_cache_new('passwdconf',$dom,$confighash{'passwords'},$cachetime); |
|
if (ref($lastactref) eq 'HASH') { |
|
$lastactref->{'passwdconf'} = 1; |
|
} |
|
} |
} else { |
} else { |
$resulttext = '<span class="LC_error">'. |
$resulttext = '<span class="LC_error">'. |
&mt('An error occurred: [_1]',$putresult).'</span>'; |
&mt('An error occurred: [_1]',$putresult).'</span>'; |
Line 19136 sub devalidate_remote_domconfs {
|
Line 19146 sub devalidate_remote_domconfs {
|
my %servers = &Apache::lonnet::internet_dom_servers($dom); |
my %servers = &Apache::lonnet::internet_dom_servers($dom); |
my %thismachine; |
my %thismachine; |
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); |
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); |
my @posscached = ('domainconfig','domdefaults','ltitools','usersessions','directorysrch'); |
my @posscached = ('domainconfig','domdefaults','ltitools','usersessions', |
|
'directorysrch','passwdconf'); |
if (keys(%servers)) { |
if (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
next if ($thismachine{$server}); |
next if ($thismachine{$server}); |