Commit ea80c2fa authored by Ben Hayward's avatar Ben Hayward

Updating

1 merge request!345WIP: [Sprint/OldfashionedOwl](fix): Updated from address in ban email to info@minds.com
Pipeline #89875915 canceled with stages
in 16 seconds
......@@ -81,11 +81,11 @@ class Ban
*/
public function ban($banReason = '')
{
error_log("ban called");
if (!$this->user) {
throw new \Exception('Missing User');
}
$banned = $this->banDelegate->ban($this->user, $banReason);
if ($banned) {
$this->logoutDelegate->logout($this->user);
......
......@@ -52,9 +52,8 @@ class Mailer
$this->mailer->ClearAllRecipients();
$this->mailer->ClearAttachments();
error_log(var_export($message->from, true));
if (isset($message->from)) {
if (isset($message->from['email'])) {
$this->mailer->ClearReplyTos();
$this->mailer->addReplyTo($message->from['email'], $fromName);
}
......
......@@ -27,11 +27,12 @@ class Events
->set('email', $user->getEmail())
->set('reason', $user->ban_reason)
->set('user', $user);
$message = new Core\Email\Message();
$message->setTo($user)
->setMessageId(implode('-', [$user->guid, sha1($user->getEmail()), sha1('register-' . time())]))
->setSubject("You are banned from Minds.")
->setFrom($config->get('contact_email'))
->setFrom($config->get('contact_details')['email'], $config->get('contact_details')['name'])
->setHtml($template);
Di::_()->get('Mailer')->queue($message);
......
......@@ -582,7 +582,10 @@ $CONFIG->set('pro', [
'dynamodb_table_name' => 'traefik',
]);
$CONFIG->set('contact_email', 'info@minds.com');
$CONFIG->set('contact_details', [
'name' => 'Minds',
'email' => 'info@minds.com',
]);
$CONFIG->set('upgrades', [
'pro' => [
......
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