Commit bb7b8621 authored by Ben Hayward's avatar Ben Hayward

Update for feedback

1 merge request!345[Sprint/OldfashionedOwl](fix): Updated from address in ban email to info@minds.com
Pipeline #85081022 passed with stages
in 10 minutes and 3 seconds
......@@ -9,12 +9,14 @@ use Minds\Entities;
use Minds\Helpers;
use Minds\Core\Analytics\Metrics\Event;
use Minds\Core\Events\Dispatcher;
use Minds\Core\Di\Di;
class Events
{
public function register()
{
Core\Di\Di::_()->get('EventsDispatcher')->register('ban', 'user', function ($event) {
Di::_()->get('EventsDispatcher')->register('ban', 'user', function ($event) {
$config = Di::_()->get('Config');
$user = $event->getParameters();
//send ban email
$template = new Core\Email\Template();
......@@ -29,9 +31,9 @@ class Events
$message->setTo($user)
->setMessageId(implode('-', [$user->guid, sha1($user->getEmail()), sha1('register-' . time())]))
->setSubject("You are banned from Minds.")
->setFrom('info@minds.com')
->setFrom($config->get('contact_email'))
->setHtml($template);
Core\Di\Di::_()->get('Mailer')->queue($message);
Di::_()->get('Mailer')->queue($message);
// Record metric
......
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