Skip to content

Commit

Permalink
Merge pull request #6939 from Webmecanik/fix-send-user-email-form-action
Browse files Browse the repository at this point in the history
Add user exist verification
  • Loading branch information
alanhartless committed Mar 4, 2019
2 parents 632e52f + b709bc4 commit fec4103
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/bundles/EmailBundle/Model/EmailModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,12 @@ public function sendEmailToUser(
}

if (!isset($user['email'])) {
$userEntity = $this->userModel->getEntity($id);
$userEntity = $this->userModel->getEntity($id);

if ($userEntity === null) {
continue;
}

$user['email'] = $userEntity->getEmail();
$user['firstname'] = $userEntity->getFirstName();
$user['lastname'] = $userEntity->getLastName();
Expand Down

0 comments on commit fec4103

Please sign in to comment.