Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #19: Adjust notification email code for better compatibility with other modules. #27

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions profile.module
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ function profile_form_validate_handler(&$form, &$form_state) {
* This callback disables the notification emails during the execution of the
* user_register_submit() callback. The reason for this is that we want to
* support profile tokens in emails during registration, and there is no other
* proper way to do this. See https://backdrop.org/node/1097684.
* proper way to do this. See https://drupal.org/node/1097684.
*
* @see profile_form_after_user_register_submit_handler()
* @see user_register_submit()
Expand Down Expand Up @@ -780,14 +780,15 @@ function profile_form_before_user_register_submit_handler(&$form, &$form_state)
// Temporary disable the notification about registration.
$config->set($register_op, FALSE);
}
$config->save();
}

/**
* User registration form submit handler that executes right after
* user_register_submit().
*
* This callback sends delayed email notification to a user
* about their registration. See https://backdrop.org/node/1097684.
* about their registration. See https://drupal.org/node/1097684.
*
* @see profile_form_prepare_user_register_submit_handler()
* @see user_register_submit()
Expand Down Expand Up @@ -819,6 +820,7 @@ function profile_form_after_user_register_submit_handler(&$form, &$form_state) {
$config->set($register_op, TRUE);
}
}
$config->save();

// Get the values that we need to define which notification
// should be sent to the user. Generally this is a trimmed version
Expand Down