--- loncom/interface/lonuserutils.pm 2008/06/24 16:17:05 1.59 +++ loncom/interface/lonuserutils.pm 2008/07/12 23:56:13 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.59 2008/06/24 16:17:05 bisitz Exp $ +# $Id: lonuserutils.pm,v 1.60 2008/07/12 23:56:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4573,10 +4573,14 @@ sub can_modify_userinfo { if (ref($userroles) eq 'ARRAY') { foreach my $role (@{$userroles}) { my $testrole; - if ($role =~ /^cr\//) { - $testrole = 'cr'; - } else { + if ($context eq 'selfcreate') { $testrole = $role; + } else { + if ($role =~ /^cr\//) { + $testrole = 'cr'; + } else { + $testrole = $role; + } } if (ref($domconfig{'usermodification'}{$context}{$testrole}) eq 'HASH') { if ($domconfig{'usermodification'}{$context}{$testrole}{$field}) {