summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit2017-03-18 19:09:58 (GMT)
committerJason Flatt2017-03-18 19:09:58 (GMT)
commiteaa251778a26df7ce894a85d15cd18c5f3709ae1 (patch)
tree44015dd3988da00c3e60555286c295b345c27fde
parentf546c5f855bd6ab1c29ba44142331d2f0ed2e59e (diff)
Issue #2826697 by Tom M Fallon, oadaeh: Unable to disable or enable a new users notification / private messages programatically
-rw-r--r--pm_email_notify/pm_email_notify.module7
-rwxr-xr-xprivatemsg.module8
2 files changed, 15 insertions, 0 deletions
diff --git a/pm_email_notify/pm_email_notify.module b/pm_email_notify/pm_email_notify.module
index b36f735..6594f6f 100644
--- a/pm_email_notify/pm_email_notify.module
+++ b/pm_email_notify/pm_email_notify.module
@@ -366,6 +366,13 @@ function pm_email_notify_form_user_profile_form_alter(&$form, &$form_state) {
}
/**
+ * Implements hook_user_insert().
+ */
+function pm_email_notify_user_insert(&$edit, $account, $category) {
+ pm_email_notify_user_update($edit, $account, $category);
+}
+
+/**
* Implements hook_user_update().
*/
function pm_email_notify_user_update(&$edit, $account, $category) {
diff --git a/privatemsg.module b/privatemsg.module
index 639ced8..93155f7 100755
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -1404,6 +1404,14 @@ function privatemsg_account_fieldset_remove_if_empty($element) {
}
/**
+ * Implements hook_user_insert().
+ */
+function privatemsg_user_insert(&$edit, $account, $category) {
+ // Insert and update run the same code.
+ privatemsg_user_update($edit, $account, $category);
+}
+
+/**
* Implements hook_user_update().
*/
function privatemsg_user_update(&$edit, $account, $category) {