Send email to the admin when a new patron joins

This commit is contained in:
Alex Cabal 2022-07-09 12:26:32 -05:00
parent e2a1dbb1e5
commit fa8fa4f7eb
5 changed files with 70 additions and 0 deletions

View file

@ -163,6 +163,7 @@ try{
$patron = new Patron();
$patron->UserId = $payment->UserId;
$patron->User = $payment->User;
$patron->User->Payments = [$payment];
$patron->IsAnonymous = (trim($detailsRow->findElement(WebDriverBy::xpath('//td[preceding-sibling::td[normalize-space(.) = "Attribution"]]'))->getText()) == 'Private');
$patron->IsSubscribedToEmails = $patron->User !== null && $patron->User->Email !== null;