my ($count,$results);
-if (C4::Context->preference("IndependantBranches")){
- if (C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{'branch'}){
- $$patron{branchcode}=C4::Context->userenv->{'branch'} unless (C4::Context->userenv->{'branch'} eq "insecure");
- }
-}
$$patron{firstname}.="\%" if ($$patron{firstname});
$$patron{surname}.="\%" if ($$patron{surname});
my $from= ($startfrom-1)*$resultsperpage;
my $to=$from+$resultsperpage;
#($results)=Search(\@searchpatron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ) if (@searchpatron);
- ($results)=Search(\@searchpatron,{surname=>1,firstname=>1},undef,undef,["firstname","surname","email","othernames","cardnumber"],"start_with" ) if (@searchpatron);
+ ($results)=Search(\@searchpatron,{surname=>1,firstname=>1},undef,undef,["firstname","surname","email","othernames","cardnumber","userid"],"start_with" ) if (@searchpatron);
if ($results){
$count =scalar(@$results);
}