mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-01-07 13:02:21 +00:00
Notifications par mail admin
This commit is contained in:
parent
7e4a08cf48
commit
b8d4c24d0c
@ -44,9 +44,12 @@ class Mailer
|
|||||||
{
|
{
|
||||||
/** @var User $admin */
|
/** @var User $admin */
|
||||||
foreach (User::getAdmins() as $admin) {
|
foreach (User::getAdmins() as $admin) {
|
||||||
|
if (!$admin->doReceiveAnimathMails())
|
||||||
|
continue;
|
||||||
|
|
||||||
$c = preg_replace("#{FIRST_NAME}#", $admin->getFirstName(), $content);
|
$c = preg_replace("#{FIRST_NAME}#", $admin->getFirstName(), $content);
|
||||||
$c = preg_replace("#{SURNAME}#", $admin->getSurname(), $c);
|
$c = preg_replace("#{SURNAME}#", $admin->getSurname(), $c);
|
||||||
// self::sendMail($admin->getEmail(), $subject, $c, $from);
|
self::sendMail($admin->getEmail(), $subject, $c, $from);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,12 +51,13 @@ if (!$has_error && (isset($my_account) || isset($new_password))) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
<label for="receive_animath_mails">
|
||||||
<label for="receive_animath_mails">J'accepte d'être recontacté par l'association <em>Animath</em> au sujet
|
<?= $user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT
|
||||||
d'autres activités (<em>facultatif</em>) :</label>
|
? "J'accepte d'être recontacté par l'association <em>Animath</em> au sujet d'autres activités (<em>facultatif</em>) :"
|
||||||
<input type="checkbox" id="receive_animath_mails" name="receive_animath_mails"
|
: "Recevoir les notifications par mail :" ?>
|
||||||
|
</label>
|
||||||
|
<input type="checkbox" id="receive_animath_mails" name="receive_animath_mails"
|
||||||
<?= $user->doReceiveAnimathMails() ? "checked" : "" ?> />
|
<?= $user->doReceiveAnimathMails() ? "checked" : "" ?> />
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
Loading…
Reference in New Issue
Block a user