--- loncom/interface/createaccount.pm 2010/12/24 20:36:11 1.40.2.3 +++ loncom/interface/createaccount.pm 2011/09/29 14:12:21 1.40.2.4 @@ -3,7 +3,7 @@ # institutional log-in ID (institutional authentication required - localauth # or kerberos) or an e-mail address. # -# $Id: createaccount.pm,v 1.40.2.3 2010/12/24 20:36:11 raeburn Exp $ +# $Id: createaccount.pm,v 1.40.2.4 2011/09/29 14:12:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -796,6 +796,17 @@ sub get_creation_controls { if (ref($usercreation->{'cancreate'}) eq 'HASH') { if (ref($usercreation->{'cancreate'}{'statustocreate'}) eq 'ARRAY') { @statustocreate = @{$usercreation->{'cancreate'}{'statustocreate'}}; + if (@statustocreate == 0) { + my ($othertitle,$usertypes,$types) = + &Apache::loncommon::sorted_inst_types($domain); + if (ref($types) eq 'ARRAY') { + if (@{$types} == 0) { + @statustocreate = ('default'); + } + } else { + @statustocreate = ('default'); + } + } } else { @statustocreate = ('default'); my ($othertitle,$usertypes,$types) = @@ -974,7 +985,7 @@ sub username_check { } } if ($checkfail) { - $msg = '