Commit c22b577a authored by Andreas Heimann's avatar Andreas Heimann

more email responses

parent 8a20a2e6
......@@ -407,11 +407,20 @@ class ModerationController extends AbstractController
->setTo($reportSongUploader->getEmail())
->setBody(
$this->renderView(
'emails/moderation/songRemovedReport.txt.twig',
'emails/moderation/songRemovedReportUser.txt.twig',
['song' => $reportSong, 'report' => $report]
), 'text/plain');
// TODO: Email to reporter that action was taken
$mailer->send($message);
$message = (new \Swift_Message('[#SONG-'.$report->getId().'] Action was taken for your report!'))
->setFrom('legal@spinsha.re')
->setTo($report->getEmail())
->setBody(
$this->renderView(
'emails/moderation/songRemovedReportReporter.txt.twig',
['report' => $report, 'song' => $reportSong]
), 'text/plain');
$mailer->send($message);
......@@ -432,7 +441,15 @@ class ModerationController extends AbstractController
$userToBan = $em->getRepository(User::class)->findOneBy(array('id' => $userId));
$userToBan->setEnabled(false);
// TODO: Email to user that he got banned
$message = (new \Swift_Message('Your account was banned!'))
->setFrom('legal@spinsha.re')
->setTo($userToBan->getEmail())
->setBody(
$this->renderView(
'emails/moderation/userBanned.txt.twig'
), 'text/plain');
$mailer->send($message);
$em->persist($userToBan);
$em->flush();
......@@ -451,7 +468,15 @@ class ModerationController extends AbstractController
$userToUnban = $em->getRepository(user::class)->findOneBy(array('id' => $userId));
$userToUnban->setEnabled(true);
// TODO: Email to user that he got unbanned
$message = (new \Swift_Message('Your account was unbanned!'))
->setFrom('legal@spinsha.re')
->setTo($userToUnban->getEmail())
->setBody(
$this->renderView(
'emails/moderation/userUnbanned.txt.twig'
), 'text/plain');
$mailer->send($message);
$em->persist($userToUnban);
$em->flush();
......@@ -470,7 +495,16 @@ class ModerationController extends AbstractController
$userToToggle = $em->getRepository(user::class)->findOneBy(array('id' => $userId));
$userToToggle->setIsVerified(!$userToToggle->getIsVerified());
// TODO: Email to user that he got verified
$message = (new \Swift_Message('Your verification status changed!'))
->setFrom('legal@spinsha.re')
->setTo($userToToggle->getEmail())
->setBody(
$this->renderView(
'emails/moderation/userVerification.txt.twig',
['user' => $userToToggle]
), 'text/plain');
$mailer->send($message);
$em->persist($userToToggle);
$em->flush();
......@@ -494,8 +528,6 @@ class ModerationController extends AbstractController
$userToToggle->addRole("ROLE_MODERATOR");
}
// TODO: Email to user that he received mod status or got demoted
$em->persist($userToToggle);
$em->flush();
......@@ -523,7 +555,15 @@ class ModerationController extends AbstractController
}
// TODO: Email to user that his avatar was reset
$message = (new \Swift_Message('Your user avatar was reset!'))
->setFrom('legal@spinsha.re')
->setTo($userToReset->getEmail())
->setBody(
$this->renderView(
'emails/moderation/userAvatarReset.txt.twig'
), 'text/plain');
$mailer->send($message);
// Remove Entity
$em->persist($userToReset);
......
Hey there!
We are pleased to inform you that the song "{{ song.title }} - {{ song.artist }}" from your report #SONG-{{ report.id }} was removed by a moderator of our team.
The user who uploaded this content was informed of this decision. Please contact legal@spinsha.re if there is more we can do for you in this matter.
------------------
spinsha.re
\ No newline at end of file
Hey there!
We are sorry to inform you that your avatar was reset by a moderator of our team.
If you think this was a mistake, please report back to legal@spinsha.re.
------------------
spinsha.re
\ No newline at end of file
Hey there!
We are sorry to inform you that your user account was banned by a moderator of our team. You can still use the page & client but won't be able to log into your account anymore.
If you think this was a mistake, please report back to legal@spinsha.re.
------------------
spinsha.re
\ No newline at end of file
Hey there!
Your user account was unbanned by a moderator of our team.
Please contact legal@spinsha.re if there is more we can do for you in this matter.
------------------
spinsha.re
\ No newline at end of file
Hey there!
{% if user.isVerified %}
We are happy to inform you that your account is now verified.
{% else %}
We are sorry to inform you that your account is not verified anymore. If you think this was a mistake, please report back to legal@spinsha.re.
{% endif %}
------------------
spinsha.re
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment