mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Do not die if "user_history" mail template cannot be loaded
This commit is contained in:
parent
6768fe96c2
commit
8a47afef58
@ -116,10 +116,7 @@ class MailController extends AbstractController
|
||||
|
||||
// Load mail templates and substitute placeholders there.
|
||||
$mail_template = MailTemplate::loadByName('user_history', get_current_locale());
|
||||
if (!$mail_template) {
|
||||
throw new \RuntimeException('Cannot load "user_history" mail template');
|
||||
}
|
||||
|
||||
if ($mail_template) {
|
||||
$this->sendMail(MailUtils::buildMessage(
|
||||
$email,
|
||||
MIBEW_MAILBOX,
|
||||
@ -131,6 +128,12 @@ class MailController extends AbstractController
|
||||
Settings::get('hosturl'),
|
||||
))
|
||||
));
|
||||
} else {
|
||||
trigger_error(
|
||||
'Cannot send e-mail because "user_history" mail template cannot be loaded.',
|
||||
E_USER_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
$page = setup_logo($group);
|
||||
$page['email'] = $email;
|
||||
|
Loading…
Reference in New Issue
Block a user