Hi,
I've been using your module for a while now and I really like it. On thing I do think is missing; variable custom addresses.
Example; a site has been setup so that a user has to enter profile fields for account creation. In one of these profile fields the user is asked the monthly turnover of his/her company via a select menu. Now based on the choice the user has given I want to send the notification email to a junior, medior or senior sales person. I could think of many other posibillities, but this is the first that came to mind.
Now since this should be extendable to specific wishes I think it would be better to have a php field which may work with the given user/profile vars to return one or multiple email address via custom code.
What do you think?
Cheers
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | user_register_notify_php.patch | 4.92 KB | bartezz |
| #2 | user_register_notify_php.patch | 4.91 KB | bartezz |
Comments
Comment #1
bartezz commentedHave been working on a sub module to achieve this. What it does;
- adds a permission setting for PHP usage
- adds a radio button option to the 3 existing to add PHP code to return an email address for those with the permission
- adds a textarea in which one can insert PHP to return an email address, the $account variable is available for usage
This way one can send notifications conditionally.
I'm using this myself for regional managers. With the PHP code I look up the administrator from that region and send the notification email to him/her. But you could also use this for other functionallity ofcourse.
I will post the patch for the submodule here next week after thorough testing.
Cheers
Comment #2
bartezz commentedOk here is the patch. This patch will add 'User registration notification PHP' as a submodule which can be activated separately.
The patch is thoroughly tested and the code has been checked with coder.module and coder_tough_love.module
When the submodule is enabled, it;
Notice: be carefull granting the PHP permission as drupal_eval() in your module's code could have a security risk if the PHP input provided to the function contains malicious code.
Hope you appreciate this patch and that it'll be committed!
Cheers,
Bartezz
Comment #3
bartezz commentedCrap I attached the incorrect patch in #2, please see correct patch attached!
Comment #4
bartezz commentedHave been running a live site with this patch for a month now without problems. Works great!
Is there a chance this will be committed?
Cheers
Comment #5
rmiddle commentedI will review the patch so and likely include.
Thanks
Robert
Comment #6
bartezz commentedNice! Thanx for reviewing it, hope you like it.
Cheers
Comment #7
hass commentedPlease also fix the code style issues.
Comment #8
hass commented