--- loncom/interface/domainprefs.pm 2019/04/22 01:55:17 1.354
+++ loncom/interface/domainprefs.pm 2019/04/26 20:15:30 1.355
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.354 2019/04/22 01:55:17 raeburn Exp $
+# $Id: domainprefs.pm,v 1.355 2019/04/26 20:15:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -13960,7 +13960,8 @@ sub modify_contacts {
sub modify_passwords {
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';
if (ref($domconfig{'passwords'}) eq 'HASH') {
%current = %{$domconfig{'passwords'}};
@@ -14248,6 +14249,9 @@ sub modify_passwords {
$resulttext = &mt('Changes made: ').'
';
foreach my $key ('reset','intauth','rules','crsownerchg') {
if ($changes{$key}) {
+ unless ($key eq 'intauth') {
+ $updateconf = 1;
+ }
$resulttext .= '- '.$titles{$key}.':
';
if ($key eq 'reset') {
if ($confighash{'passwords'}{'captcha'} eq 'original') {
@@ -14394,13 +14398,19 @@ sub modify_passwords {
} else {
$resulttext = &mt('No changes made to password settings');
}
+ my $cachetime = 24*60*60;
if ($updatedefaults) {
- my $cachetime = 24*60*60;
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);
if (ref($lastactref) eq 'HASH') {
$lastactref->{'domdefaults'} = 1;
}
}
+ if ($updateconf) {
+ &Apache::lonnet::do_cache_new('passwdconf',$dom,$confighash{'passwords'},$cachetime);
+ if (ref($lastactref) eq 'HASH') {
+ $lastactref->{'passwdconf'} = 1;
+ }
+ }
} else {
$resulttext = ''.
&mt('An error occurred: [_1]',$putresult).'';
@@ -19136,7 +19146,8 @@ sub devalidate_remote_domconfs {
my %servers = &Apache::lonnet::internet_dom_servers($dom);
my %thismachine;
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)) {
foreach my $server (keys(%servers)) {
next if ($thismachine{$server});