--- loncom/interface/loncreateuser.pm 2016/09/18 18:10:54 1.406.2.3 +++ loncom/interface/loncreateuser.pm 2016/02/19 20:28:46 1.410 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.406.2.3 2016/09/18 18:10:54 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.410 2016/02/19 20:28:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -813,7 +813,7 @@ sub entry_form { } my $cancreate = &Apache::lonuserutils::can_create_user($dom,$context,$usertype); - my ($userpicker,$cansearch) = + my $userpicker = &Apache::loncommon::user_picker($dom,$srch,$forcenewuser, 'document.crtuser',$cancreate,$usertype); my $srchbutton = &mt('Search'); @@ -822,9 +822,7 @@ sub entry_form { } elsif ($cancreate && $responsemsg ne '' && $inexact) { $srchbutton = &mt('Search or Add New User'); } - my $output; - if ($cansearch) { - $output = <<"ENDBLOCK"; + my $output = <<"ENDBLOCK";
ENDBLOCK - } else { - $output = ''.$userpicker.'
'; - } if ($env{'form.phase'} eq '') { my $defdom=$env{'request.role.domain'}; my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain'); @@ -3115,7 +3110,7 @@ sub update_user_data { \%newsettingstext); if ($env{'form.cid'} ne $userenv{'id'}) { &Apache::lonnet::idput($env{'form.ccdomain'}, - ($env{'form.ccuname'} => $env{'form.cid'})); + {$env{'form.ccuname'} => $env{'form.cid'}},$uhome,'ids'); if (($recurseid) && (&Apache::lonnet::allowed('mau',$env{'form.ccdomain'}))) { my $idresult = @@ -6831,26 +6826,10 @@ sub user_search_result { $response = ''.$response.''; } if ($srch->{'srchin'} eq 'instd') { - my $instd_chk = &instdirectorysrch_check($srch); + my $instd_chk = &directorysrch_check($srch); if ($instd_chk ne 'ok') { - my $domd_chk = &domdirectorysrch_check($srch); - $response = ''.$instd_chk.'