Include OG in Registration E-mail
l33tpolicywonk - January 19, 2009 - 18:42
| Project: | User registration notification |
| Version: | 6.x-1.9 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Hello,
I'm trying to modify this module to include the OG a user selects at registration in the e-mail. Can anyone offer some advice as to how to implement this feature? Thanks.

#1
The spot to add the data is in user_register_notify_mail. Do you have any info out where you get the info from. If so I can look at adding support.
Thanks
Robert
#2
Robert,
Thanks for your help.
From what I'm seeing, you basically have to pull nid from the table og_uid where uid is the new registered user, then take that nid and use it in table og to find description.
In order to do that, I wrote:
$result2 = db_query('SELECT nid FROM {og_uid} WHERE uid = %d', $og->nid);$result3 = db_query('SELECT og_description FROM {og} WHERE nid = ' . $og->nid, $og->name);
But I'm not having much luck getting it to work.
Chase
#3
I can see you sql isn't right. Let me look into it adding basic support.
Thanks
Robert
#4
l33tpolicywonk,
Replace user_register_notify.module with this file and try it out. It seems to be working for me. Once you confirm this works I will add OG support to the module.
Thanks
Robert
#5
#6
Thanks for your help, Robert.
I got the following error:
I'm sorry, I don't have database access, so I can't check the attribute name. Thanks for helping me through this.
#7
OK I see the issue. OG changed it DB structure from 5 to 6 and I missed that. Try this version. Same thing just replace the module file with this one.
Thanks
Robert
#8
Two issues:
1) For some reason, profile information no longer appears in the e-mail. Did this structure change in D6 as well?
2) The information given is the OG description, not its name.
Thanks!
#9
Check back in a few. I will look at the database some.
Thanks
Robert
#10
OK I figured out the issue with the profile. Let me look at adding the name as well as the description.
Thanks
Robert
#11
Ok updated one.
#12
Helps to include the file. Here is the latest version.
#13
This patch works perfectly ... thanks!
#14
OK. It is included in the 1.10 version. There is also a small change in the admin section telling you the !og is now available.
Thanks
Robert
#15
Automatically closed -- issue fixed for 2 weeks with no activity.