--- loncom/interface/lonpreferences.pm 2014/06/09 22:39:01 1.196.4.15 +++ loncom/interface/lonpreferences.pm 2016/01/27 01:43:01 1.196.4.17 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.196.4.15 2014/06/09 22:39:01 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.196.4.17 2016/01/27 01:43:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -789,7 +789,7 @@ sub lockwarning { my $textbottom=&mt('Changing roles or logging out may result in data corruption.'); my ($num,%which)=&Apache::lonnet::get_locks(); my $which=''; - foreach my $id (keys %which) { + foreach my $id (keys(%which)) { $which.='
  • '.$which{$id}.'
  • '; } my $change=&mt('Override'); @@ -1220,7 +1220,7 @@ sub verify_and_change_colors { ); my $message=''; - foreach my $item (keys %colortypes) { + foreach my $item (keys(%colortypes)) { my $color=$env{'form.'.$item}; if (!($color =~ /^#/)) { $color = '#' . $color; @@ -1263,6 +1263,12 @@ sub passwordchanger { $r->print(Apache::loncommon::start_page('Personal Data')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); } + my ($blocked,$blocktext) = + &Apache::loncommon::blocking_status('passwd'); + if ($blocked) { + $r->print('

    '.$blocktext.'

    '); + return; + } if ((!defined($caller)) || ($caller eq 'preferences')) { $user = $env{'user.name'}; $domain = $env{'user.domain'}; @@ -1491,6 +1497,12 @@ sub server_form { sub verify_and_change_password { my ($r,$caller,$mailtoken) = @_; my ($user,$domain,$homeserver); + my ($blocked,$blocktext) = + &Apache::loncommon::blocking_status('passwd'); + if ($blocked) { + $r->print('

    '.$blocktext.'

    '); + return; + } if ($caller eq 'reset_by_email') { $user = $env{'form.uname'}; $domain = $env{'form.udom'};