mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Fix unit tests
This commit is contained in:
@@ -119,18 +119,22 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
|
||||
$mailed = false;
|
||||
|
||||
if ($this->shouldSendNotificationFor($usr_id)) {
|
||||
$readyToSend = false;
|
||||
try {
|
||||
$admin_user = User_Adapter::getInstance($usr_id, $this->app);
|
||||
|
||||
$receiver = Receiver::fromUser($admin_user);
|
||||
$readyToSend = true;
|
||||
} catch (Exception $e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($readyToSend) {
|
||||
$mail = MailInfoUserRegistered::create($this->app, $receiver);
|
||||
$mail->setRegisteredUser($registeredUser);
|
||||
|
||||
$this->app['notification.deliverer']->deliver($mail);
|
||||
|
||||
$mailed = true;
|
||||
} catch (Exception $e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user