Needs review
Project:
LDAP provisioning
Version:
6.x-1.0-beta1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2009 at 07:37 UTC
Updated:
15 Feb 2010 at 13:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
landry commentedAny news on that issue ?
What about adding a checkbox for each e-mail to conditionally send it, or if it's too complicated maybe send it only if the subject is not empty.. that'd be nice to avoid flooding users with e-mails when doing batch imports on them.
Comment #2
landry commentedSo, more on this, i started hacking on that..
For the 5 email to send, only send if if subject is not empty, with something like :
It works fine.. but the caveat is that if you set the subject for a given mail to an empty string, and save, it is correctly saved :
but if you reload the configuration form, the default value is set back by the _ldapprov_mail_text() call.. as it is an empty string the following test at line 334 fails :
So.. i'm not really sure the 'send only if subject is not null' is the better way to go.
Miglius, what do you think about it ? Are you interested in a full patch ? I'll see if i can make a proof-of-concept with an enable/disable checkbox for each e-mail..
Comment #3
landry commentedSo it wasn't that hard.. here's a new working patch, at least for me :
- add 5 boolean variables ldapprov_mail_$key_enable defaulting to TRUE
- add a checkbox for each variable on the admin interface
- only send the e-mail if the corresponding variable is TRUE (corresponding code is reindented)
- remove the variables upon uninstall
Moving status to 'needs review' accordingly..
Comment #4
landry commentedWhoops.. attached wrong patch. Here's the correct one.