It would be nice to have the option of disabling these emails in the admin settings for the module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

hmmm, yes this would be a relatively simple change. feel free to test and submit a patch.

geodaniel’s picture

It's on my long list of things to do, but as you say it's pretty simple, so I should be able to fit it in pretty soon :)

geodaniel’s picture

Status: Active » Needs review
FileSize
5.34 KB

Attached is a patch against 4.7 branch that will add this option (default is to email admins still). I've not tried out the 5.x version of this module yet, but I imagine a slightly modified version of the patch would be applicable there too.

geodaniel’s picture

Sorry, there was a typo in that from a last minute change. Latest version attached.

pwolanin’s picture

I need to test this, still. Also, I'd suggest slightly different language for the settings form item. Something like:


  $form['og_mandatory_group_mail'] = array(
      '#title' => t('Email group managers'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('og_mandatory_group_mail', 1),
     '#description' => t('Send email to a group's managers when a new user joins the site and joins their group or is assigned to it as a mandatory group.'),
  );

pwolanin’s picture

Hmmm, maybe it should be more like:

  $form['og_mandatory_group_mail'] = array(
      '#title' => t('Email mandatory group managers'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('og_mandatory_group_mail', 1),
      '#description' => t("Should email be sent to the mandatory group's managers when a new user joins the site?"),
  );
geodaniel’s picture

Sure, sounds good to me - it makes it clearer who will receive the emails.

Junyor’s picture

Version: » 5.x-1.0-beta
Status: Needs review » Reviewed & tested by the community
FileSize
5.27 KB

Updated patch to Drupal-5.

geodaniel’s picture

Thanks for the updated patch. It would be great to get this into the module.

geodaniel’s picture

Status: Reviewed & tested by the community » Needs review
geodaniel’s picture

It would also be good to get this into the D6 release, but the patch will need re-rolling as all the hunks fail.

darren.ferguson’s picture

Have patched the d6 module for this functionality the patch is attached.

pwolanin’s picture

please double-check your patch. Looks like you made whitespace changes (e.g. line endings ) that amek it difficicult to see where the actual changes occur.

pwolanin’s picture

Version: 5.x-1.0-beta »
darren.ferguson’s picture

I do not see any line endings in the patch, the reason for the changes is the if statement there that has moved everything on the patch.

tsi’s picture

Subscribing, very wanted feature.

trjohnson’s picture

Version: » 6.x-1.0-beta1

We are running a site and encounter a strange side-effect related to this topic. We have Real Name installed, when these emails are generated from the site the username gets translated into random text, e.g. 'zcpECkyaNK' instead of the normal username.

Being able to modify the notification would be wonderful, or baring that, being able to disable these messages would be helpful too.

mrtorrent’s picture

subscribing

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me. The whitespace changes are necessary to maintain proper indenting inside the new if block.