--- loncom/lonnet/perl/lonnet.pm 2009/05/15 20:31:04 1.976.2.9 +++ loncom/lonnet/perl/lonnet.pm 2009/10/09 12:42:36 1.976.2.10 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.976.2.9 2009/05/15 20:31:04 raeburn Exp $ +# $Id: lonnet.pm,v 1.976.2.10 2009/10/09 12:42:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -748,7 +748,8 @@ sub changepass { my ($uname,$udom,$currentpass,$newpass,$server,$context)=@_; $currentpass = &escape($currentpass); $newpass = &escape($newpass); - my $answer = reply("encrypt:passwd:$udom:$uname:$currentpass:$newpass:$context", + my $lonhost = $perlvar{'lonHostID'}; + my $answer = reply("encrypt:passwd:$udom:$uname:$currentpass:$newpass:$context:$lonhost", $server); if (! $answer) { &logthis("No reply on password change request to $server ". @@ -773,6 +774,9 @@ sub changepass { } elsif ($answer =~ "^refused") { &logthis("$server refused to change $uname in $udom password because ". "it was sent an unencrypted request to change the password."); + } elsif ($answer =~ "invalid_client") { + &logthis("$server refused to change $uname in $udom password because ". + "it was a reset by e-mail originating from an invalid server."); } return $answer; }