Lines 1630-1651
sub return_claims {
Link Here
|
1630 |
|
1630 |
|
1631 |
=head3 notice_email_address |
1631 |
=head3 notice_email_address |
1632 |
|
1632 |
|
1633 |
my $email = $patron->notice_email_address; |
1633 |
my $email = $patron->notice_email_address; |
1634 |
|
1634 |
|
1635 |
Return the email address of patron used for notices. |
1635 |
Return the email address of patron used for notices. |
1636 |
Returns the empty string if no email address. |
1636 |
Returns the empty string if no email address. |
1637 |
|
1637 |
|
1638 |
=cut |
1638 |
=cut |
1639 |
|
1639 |
|
1640 |
sub notice_email_address{ |
1640 |
sub notice_email_address { |
1641 |
my ( $self ) = @_; |
1641 |
my ($self) = @_; |
1642 |
|
1642 |
|
1643 |
my $which_address = C4::Context->preference("EmailFieldPrimary"); |
1643 |
my $which_address = C4::Context->preference("EmailFieldPrimary"); |
1644 |
|
1644 |
|
1645 |
# if syspref is set to 'first valid' (value == OFF), look up email address |
1645 |
# if syspref is set to 'first valid', look up email address |
1646 |
if ( $which_address eq 'OFF' ) { |
1646 |
return $self->first_valid_email_address |
1647 |
return $self->first_valid_email_address; |
1647 |
unless $which_address; |
1648 |
} |
|
|
1649 |
|
1648 |
|
1650 |
# if syspref is set to 'selected addresses' (value == MULTI), look up email addresses |
1649 |
# if syspref is set to 'selected addresses' (value == MULTI), look up email addresses |
1651 |
if ( $which_address eq 'MULTI' ) { |
1650 |
if ( $which_address eq 'MULTI' ) { |
Lines 1655-1665
sub notice_email_address{
Link Here
|
1655 |
my $email_address = $self->$email_field; |
1654 |
my $email_address = $self->$email_field; |
1656 |
push @addresses, $email_address if $email_address; |
1655 |
push @addresses, $email_address if $email_address; |
1657 |
} |
1656 |
} |
1658 |
return join(",",@addresses); |
1657 |
return join( ",", @addresses ); |
1659 |
} |
1658 |
} |
1660 |
|
1659 |
|
1661 |
return $self->$which_address || ''; |
1660 |
return $self->$which_address || ''; |
1662 |
|
|
|
1663 |
} |
1661 |
} |
1664 |
|
1662 |
|
1665 |
=head3 first_valid_email_address |
1663 |
=head3 first_valid_email_address |
1666 |
- |
|
|