add option to disable mail notifications for users (issue #330)
This commit is contained in:
parent
0076e9b629
commit
9d0275eb7a
6 changed files with 99 additions and 77 deletions
|
|
@ -879,19 +879,21 @@
|
|||
foreach($moderators as &$moderator)
|
||||
{
|
||||
$user = $this->Users->getUserById($moderator['user_id']);
|
||||
\hhu\z\Utils::sendMail(
|
||||
$user['email'],
|
||||
'charactersubmission',
|
||||
true,
|
||||
array(
|
||||
$user,
|
||||
$seminary,
|
||||
$questgroup,
|
||||
$quest,
|
||||
$character
|
||||
),
|
||||
$this->linker
|
||||
);
|
||||
if($user['mailing']) {
|
||||
\hhu\z\Utils::sendMail(
|
||||
$user['email'],
|
||||
'charactersubmission',
|
||||
true,
|
||||
array(
|
||||
$user,
|
||||
$seminary,
|
||||
$questgroup,
|
||||
$quest,
|
||||
$character
|
||||
),
|
||||
$this->linker
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(\hhu\z\exceptions\MailingException $e) {
|
||||
|
|
@ -912,6 +914,9 @@
|
|||
{
|
||||
// Get user
|
||||
$user = $this->Users->getUserById($character['user_id']);
|
||||
if(!$user['mailing']) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send notification mail
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue