Lines 249-255
sub Search {
Link Here
|
249 |
$filter = [ $filter ]; |
249 |
$filter = [ $filter ]; |
250 |
push @$filter, {"borrowernumber"=>$matching_records}; |
250 |
push @$filter, {"borrowernumber"=>$matching_records}; |
251 |
} |
251 |
} |
252 |
} |
252 |
} |
253 |
} |
253 |
} |
254 |
|
254 |
|
255 |
# $showallbranches was not used at the time SearchMember() was mainstreamed into Search(). |
255 |
# $showallbranches was not used at the time SearchMember() was mainstreamed into Search(). |
Lines 284-290
sub Search {
Link Here
|
284 |
} |
284 |
} |
285 |
$searchtype ||= "start_with"; |
285 |
$searchtype ||= "start_with"; |
286 |
|
286 |
|
287 |
return SearchInTable( "borrowers", $filter, $orderby, $limit, $columns_out, $search_on_fields, $searchtype ); |
287 |
return SearchInTable( "borrowers", $filter, $orderby, $limit, $columns_out, $search_on_fields, $searchtype ); |
288 |
} |
288 |
} |
289 |
|
289 |
|
290 |
=head2 GetMemberDetails |
290 |
=head2 GetMemberDetails |
Lines 722-728
sub ModMember {
Link Here
|
722 |
$data{password} = hash_password($data{password}); |
722 |
$data{password} = hash_password($data{password}); |
723 |
} |
723 |
} |
724 |
} |
724 |
} |
725 |
my $execute_success=UpdateInTable("borrowers",\%data); |
725 |
my $execute_success=UpdateInTable("borrowers",\%data); |
726 |
if ($execute_success) { # only proceed if the update was a success |
726 |
if ($execute_success) { # only proceed if the update was a success |
727 |
# ok if its an adult (type) it may have borrowers that depend on it as a guarantor |
727 |
# ok if its an adult (type) it may have borrowers that depend on it as a guarantor |
728 |
# so when we update information for an adult we should check for guarantees and update the relevant part |
728 |
# so when we update information for an adult we should check for guarantees and update the relevant part |
Lines 772-782
sub AddMember {
Link Here
|
772 |
$data{'borrowernumber'}=InsertInTable("borrowers",\%data); |
772 |
$data{'borrowernumber'}=InsertInTable("borrowers",\%data); |
773 |
|
773 |
|
774 |
|
774 |
|
775 |
# generate a proper login if none provided |
775 |
# generate a proper login if none provided |
776 |
$data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq ''; |
776 |
$data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq ''; |
777 |
# create a disabled account if no password provided |
777 |
# create a disabled account if no password provided |
778 |
$data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!'; |
778 |
$data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!'; |
779 |
$data{'borrowernumber'}=InsertInTable("borrowers",\%data); |
779 |
$data{'borrowernumber'}=InsertInTable("borrowers",\%data); |
780 |
# mysql_insertid is probably bad. not necessarily accurate and mysql-specific at best. |
780 |
# mysql_insertid is probably bad. not necessarily accurate and mysql-specific at best. |
781 |
logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog"); |
781 |
logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog"); |
782 |
|
782 |
|
783 |
- |
|
|