Skip to content

Commit

Permalink
we can only send an email if they have an address
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Closs committed Aug 17, 2011
1 parent e08e157 commit bdf6034
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Biopay.pm
Expand Up @@ -431,6 +431,10 @@ get '/members/:member_id/cancel' => sub {

get '/members/:member_id/send-update-payment-email' => sub {
my $member = member();
unless ($member->email) {
session message => "That member does not have an email address set.";
return redirect '/members/' . $member->id;
}
$member->send_payment_update_email;
session message => "An email has been sent to the user requesting "
. "that they update their payment methods.";
Expand Down

0 comments on commit bdf6034

Please sign in to comment.