Lines 82-88
BEGIN {
Link Here
|
82 |
&GetUpcomingMembershipExpires |
82 |
&GetUpcomingMembershipExpires |
83 |
|
83 |
|
84 |
&IssueSlip |
84 |
&IssueSlip |
85 |
GetBorrowersWithEmail |
|
|
86 |
|
85 |
|
87 |
GetOverduesForPatron |
86 |
GetOverduesForPatron |
88 |
); |
87 |
); |
Lines 1589-1621
sub IssueSlip {
Link Here
|
1589 |
); |
1588 |
); |
1590 |
} |
1589 |
} |
1591 |
|
1590 |
|
1592 |
=head2 GetBorrowersWithEmail |
|
|
1593 |
|
1594 |
([$borrnum,$userid], ...) = GetBorrowersWithEmail('me@example.com'); |
1595 |
|
1596 |
This gets a list of users and their basic details from their email address. |
1597 |
As it's possible for multiple user to have the same email address, it provides |
1598 |
you with all of them. If there is no userid for the user, there will be an |
1599 |
C<undef> there. An empty list will be returned if there are no matches. |
1600 |
|
1601 |
=cut |
1602 |
|
1603 |
sub GetBorrowersWithEmail { |
1604 |
my $email = shift; |
1605 |
|
1606 |
my $dbh = C4::Context->dbh; |
1607 |
|
1608 |
my $query = "SELECT borrowernumber, userid FROM borrowers WHERE email=?"; |
1609 |
my $sth=$dbh->prepare($query); |
1610 |
$sth->execute($email); |
1611 |
my @result = (); |
1612 |
while (my $ref = $sth->fetch) { |
1613 |
push @result, $ref; |
1614 |
} |
1615 |
die "Failure searching for borrowers by email address: $sth->errstr" if $sth->err; |
1616 |
return @result; |
1617 |
} |
1618 |
|
1619 |
=head2 AddMember_Opac |
1591 |
=head2 AddMember_Opac |
1620 |
|
1592 |
|
1621 |
=cut |
1593 |
=cut |
1622 |
- |
|
|