--- loncom/interface/lonuserutils.pm 2020/02/12 22:25:27 1.184.4.8 +++ loncom/interface/lonuserutils.pm 2020/05/02 20:34:53 1.184.4.9 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.184.4.8 2020/02/12 22:25:27 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.184.4.9 2020/05/02 20:34:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4935,6 +4935,16 @@ sub upfile_drop_add { my (%userres,%authres,%roleres,%idres); my $singlesec = ''; if ($role eq 'st') { + if (($context eq 'domain') && ($changeauth eq 'Yes') && (!$newuser)) { + if ((&Apache::lonnet::allowed('mau',$userdomain)) && + (&Apache::lonnet::homeserver($username,$userdomain) ne 'no_host')) { + if ((($amode =~ /^krb4|krb5|internal$/) && $password ne '') || + ($amode eq 'localauth')) { + $authresult = + &Apache::lonnet::modifyuserauth($userdomain,$username,$amode,$password); + } + } + } my $sec; if (ref($userinfo{$i}{'sections'}) eq 'ARRAY') { if (@secs > 0) {