Skip to content
Snippets Groups Projects
Commit e66e946c authored by Larisse Amorim's avatar Larisse Amorim Committed by Adam Shepherd
Browse files

Issue #3270509 by larisse, AdamPS: Remove UserRegistrationPasswordEmailBuilder...

Issue #3270509 by larisse, AdamPS: Remove UserRegistrationPasswordEmailBuilder as the module is unsupported
parent 269c7c01
Branches
Tags
No related merge requests found
langcode: en
status: true
dependencies:
module:
- user_registrationpassword
id: user_registrationpassword.register_confirmation_with_pass
configuration:
email_subject:
value: 'Account details for [user:display-name] at [site:name]'
email_body:
value: >
<p>[user:display-name],</p>
<p>Thank you for registering at <a href="[site:url]">[site:name]</a>.
You may now use this link to <a href="[user:registrationpassword-url]">log in</a>. It can be used only once and you will be able to <a href="[site:login-url]">log in</a> in the future using:</p>
<ul>
<li>username: [user:account-name]</li>
<li>password: Your password</li>
</ul>
<?php
namespace Drupal\symfony_mailer_bc\Plugin\EmailBuilder;
use Drupal\symfony_mailer\Processor\EmailProcessorBase;
use Drupal\symfony_mailer\Processor\TokenProcessorTrait;
use Drupal\symfony_mailer\EmailInterface;
/**
* Defines the Email Builder plug-in for user registration password module.
*
* @EmailBuilder(
* id = "user_registrationpassword",
* sub_types = {
* "register_confirmation_with_pass" = @Translation("Welcome (no approval required, password is set)"),
* },
* )
*/
class UserRegistrationPasswordEmailBuilder extends EmailProcessorBase {
use TokenProcessorTrait;
/**
* {@inheritdoc}
*/
public function preRender(EmailInterface $email) {
$this->tokenOptions(['callback' => 'user_registrationpassword_mail_tokens', 'clear' => TRUE]);
}
}
...@@ -141,12 +141,3 @@ function symfony_mailer_bc_mailer_bc_user_alter(string &$key, array &$params, ar ...@@ -141,12 +141,3 @@ function symfony_mailer_bc_mailer_bc_user_alter(string &$key, array &$params, ar
// @see \Drupal\symfony_mailer\EmailInterface::setParam() // @see \Drupal\symfony_mailer\EmailInterface::setParam()
$params = ['user' => $params['account']]; $params = ['user' => $params['account']];
} }
/**
* Implements hook_mailer_bc_MODULE_alter() for user_registrationpassword.
*/
function symfony_mailer_bc_mailer_bc_user_registrationpassword_alter(string &$key, array &$params, array &$context) {
// Use the entity type as the parameter key.
// @see \Drupal\symfony_mailer\EmailInterface::setParam()
$params = ['user' => $params['account']];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment