[LON-CAPA-cvs] cvs: loncom /interface lonuserutils.pm

raeburn raeburn at source.lon-capa.org
Sun Apr 5 16:08:53 EDT 2020


raeburn		Sun Apr  5 20:08:53 2020 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  - Domain Coordinator can change password for existing user when assigning
    a student role in a course (in domain context only). 
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.205 loncom/interface/lonuserutils.pm:1.206
--- loncom/interface/lonuserutils.pm:1.205	Mon Feb 10 17:12:54 2020
+++ loncom/interface/lonuserutils.pm	Sun Apr  5 20:08:52 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.205 2020/02/10 17:12:54 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.206 2020/04/05 20:08:52 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5009,6 +5009,16 @@
                     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) {




More information about the LON-CAPA-cvs mailing list