--- loncom/interface/createaccount.pm 2011/01/11 16:58:27 1.46 +++ loncom/interface/createaccount.pm 2011/09/29 13:34:32 1.47 @@ -3,7 +3,7 @@ # institutional log-in ID (institutional authentication required - localauth # or kerberos) or an e-mail address. # -# $Id: createaccount.pm,v 1.46 2011/01/11 16:58:27 raeburn Exp $ +# $Id: createaccount.pm,v 1.47 2011/09/29 13:34:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -795,6 +795,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) = @@ -973,7 +984,7 @@ sub username_check { } } if ($checkfail) { - $msg = '