Pass SubscriberEntity to sendConfirmationEmail() and sendConfirmationEmailOnce()
This commit changes the methods sendConfirmationEmail() and sendConfirmationEmailOnce() to accept as the first parameter an instance of SubscriberEntity instead of the old model Subscriber. It also updates all the places where those two methods are called. [MAILPOET-3815]
This commit is contained in:
@ -197,8 +197,8 @@ class Subscribers extends APIEndpoint {
|
||||
|
||||
public function sendConfirmationEmail($data = []) {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$subscriber = Subscriber::findOne($id);
|
||||
if ($subscriber instanceof Subscriber) {
|
||||
$subscriber = $this->subscribersRepository->findOneById($id);
|
||||
if ($subscriber instanceof SubscriberEntity) {
|
||||
if ($this->confirmationEmailMailer->sendConfirmationEmail($subscriber)) {
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
Reference in New Issue
Block a user