--- loncom/interface/createaccount.pm 2025/02/18 02:38:06 1.89 +++ loncom/interface/createaccount.pm 2025/02/18 17:45:11 1.90 @@ -4,7 +4,7 @@ # kerberos, or SSO) or an e-mail address. Requests to use an e-mail address as # username may be processed automatically, or may be queued for approval. # -# $Id: createaccount.pm,v 1.89 2025/02/18 02:38:06 raeburn Exp $ +# $Id: createaccount.pm,v 1.90 2025/02/18 17:45:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -159,7 +159,7 @@ sub handler { my ($cancreate,$statustocreate,$statusforemail,$emailusername, $emailoptions,$verification,$emaildomain,$types,$usertypes,$othertitle) = &get_creation_controls($domain,$domconfig{'usercreation'}); - my $pagetitle; + my ($pagetitle,$need_affiliation); if (ref($cancreate) eq 'ARRAY') { unless (($env{'form.token'}) || ($sso_username ne '') || ($env{'form.phase'}) || ($env{'form.create_with_email'})) { @@ -172,6 +172,7 @@ sub handler { if ((@{$cancreate} == 1) && (@{$statusforemail} > 0)) { $pagetitle = 'Select affiliation'; } + $need_affiliation = 1; } else { $js .= &username_js(); } @@ -334,7 +335,8 @@ sub handler { } elsif (!$token) { &print_header($r,$start_page,$courseid,$pagetitle); my $now=time; - if ((grep(/^login$/,@{$cancreate})) && (!grep(/^email$/,@{$cancreate}))) { + if ((grep(/^login$/,@{$cancreate})) && + ((!grep(/^email$/,@{$cancreate})) || ($need_affiliation))) { if (open(my $jsh,"<","$include/londes.js")) { while(my $line = <$jsh>) { $r->print($line);