Lines 79-85
BEGIN {
Link Here
|
79 |
&GetUpcomingMembershipExpires |
79 |
&GetUpcomingMembershipExpires |
80 |
|
80 |
|
81 |
&IssueSlip |
81 |
&IssueSlip |
82 |
GetBorrowersWithEmail |
|
|
83 |
|
82 |
|
84 |
GetOverduesForPatron |
83 |
GetOverduesForPatron |
85 |
); |
84 |
); |
Lines 1414-1446
sub IssueSlip {
Link Here
|
1414 |
); |
1413 |
); |
1415 |
} |
1414 |
} |
1416 |
|
1415 |
|
1417 |
=head2 GetBorrowersWithEmail |
|
|
1418 |
|
1419 |
([$borrnum,$userid], ...) = GetBorrowersWithEmail('me@example.com'); |
1420 |
|
1421 |
This gets a list of users and their basic details from their email address. |
1422 |
As it's possible for multiple user to have the same email address, it provides |
1423 |
you with all of them. If there is no userid for the user, there will be an |
1424 |
C<undef> there. An empty list will be returned if there are no matches. |
1425 |
|
1426 |
=cut |
1427 |
|
1428 |
sub GetBorrowersWithEmail { |
1429 |
my $email = shift; |
1430 |
|
1431 |
my $dbh = C4::Context->dbh; |
1432 |
|
1433 |
my $query = "SELECT borrowernumber, userid FROM borrowers WHERE email=?"; |
1434 |
my $sth=$dbh->prepare($query); |
1435 |
$sth->execute($email); |
1436 |
my @result = (); |
1437 |
while (my $ref = $sth->fetch) { |
1438 |
push @result, $ref; |
1439 |
} |
1440 |
die "Failure searching for borrowers by email address: $sth->errstr" if $sth->err; |
1441 |
return @result; |
1442 |
} |
1443 |
|
1444 |
=head2 AddMember_Opac |
1416 |
=head2 AddMember_Opac |
1445 |
|
1417 |
|
1446 |
=cut |
1418 |
=cut |
1447 |
- |
|
|