--- loncom/interface/loncreateuser.pm 2007/11/06 04:39:19 1.191 +++ loncom/interface/loncreateuser.pm 2007/11/09 20:51:20 1.192 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.191 2007/11/06 04:39:19 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.192 2007/11/09 20:51:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2434,12 +2434,13 @@ sub handler { } elsif ($env{'form.action'} eq 'singleuser' && $permission->{'cusr'}) { my $phase = $env{'form.phase'}; my @search = ('srchterm','srchby','srchin','srchtype','srchdomain'); + &Apache::loncreateuser::restore_prev_selections(); + my $srch; + foreach my $item (@search) { + $srch->{$item} = $env{'form.'.$item}; + } if (($phase eq 'get_user_info') || ($phase eq 'userpicked')) { - my $srch; - foreach my $item (@search) { - $srch->{$item} = $env{'form.'.$item}; - } if ($env{'form.phase'} eq 'get_user_info') { my ($currstate,$response,$forcenewuser,$results) = &user_search_result($srch); @@ -2480,7 +2481,7 @@ sub handler { } elsif ($env{'form.phase'} eq 'update_user_data') { &update_user_data($r); } else { - &print_username_entry_form($r); + &print_username_entry_form($r,undef,$srch); } } elsif ($env{'form.action'} eq 'custom' && $permission->{'custom'}) { if ($env{'form.phase'} eq 'set_custom_roles') {