1
GPboarder
How do I edit the mail to administrators notifying them of a new registration?
  • 2008/10/11 3:11

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


I am using 2.2.4.
I found the file in /modules/profile/language/english/mail_template/adminactivate.tpl
and tried to add some information to it.

I edited the file to:
Hello {X_UNAME},

A new user {USERNAME} ({USEREMAIL}) has just requested membership at {SITENAME}.

{USERNAME} entered the following information:
Displayname: {DISPLAYNAME}
Employer: {EMPLOYER}
Position: {POSITION}
Work Phone: {WORK_PHONE}

Clicking on the link below will activate the account of this user:

{USERACTLINK}

-----------
{SITENAME} ({SITEURL})
webmaster
{ADMINMAIL}

but unfortunately it didn't pick up the fields the way I had hoped and the result was an e-mail that contained this:
Displayname: {DISPLAYNAME}
Employer: {EMPLOYER}
Position: {POSITION}
Work Phone: {WORK_PHONE}

in stead of the data that the new registrant had entered.
These are three fields that I had created using the extended profiles feature. Is it case sensitive perhaps?

Where have I gone wrong?
Optimism is the mother of disappointment.

2
Mamba
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/10/13 3:52

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
I am using 2.2.4

Try to test on 2.3.1 and see if it works.

Of course, backup your database before you do it.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
GPboarder
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/10/13 11:50

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


I'm not comfortable trying to upgrade to 2.3.1 for this site yet. It runs flawlessly and has for a couple of years, so I figure if it ain't broke...

I would prefer to make the small change in 2.2.4 if it is possible.

Any other suggestions?
Optimism is the mother of disappointment.

4
GPboarder
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/10/13 12:27

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


I have a fresh install of 2.3.1.
I changed the setting on the complementary registration step to save.
I made the same edits to the template file with the same result.
The activation e-mail sends once the new user has finished the first step.

I edited the file to read as follows after making the user_from field mandatory in the basic step. I think it is called location in the registration page.

Hello {X_UNAME},

A new user {USERNAME} ({USEREMAIL}) has just registered an account at {SITENAME}.
Clicking on the link below will activate the account of this user:
The new user {USERNAME} entered the following information:
Occupation: {USER_OCC}
User is from: {USER_FROM}
Extra Info: {BIO}
{USERACTLINK}

-----------
{SITENAME} ({SITEURL})
webmaster
{ADMINMAIL}
Optimism is the mother of disappointment.

5
GPboarder
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/11/14 21:09

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


I have figured out that the file that needs to be edited is in fact language/english/mail_template/adminactivate.tpl, not the one under the profile module.

I still find that the mail is not picking up the information. Does the information entered by a new user get stored somewhere temporarily until activation is complete?

The mail looks like this:

Hello mysite,

A new user test (test@mysite.ca) has just registered an account at mysite.
The new user test entered the following information:
Occupation: {USER_OCC}
Extra Info: {BIO}
Second e-mail: {email2}
Relationship: {Relationship}
Birthday: {birthdate}
Address: {street_address}, {municipality}, {user_from} {postalcode}

Clicking on the link below will activate the account of this user:

Only the username and the email are being picked up and included in the mail.

I know someone is smiling at my question, so come on, throw me a bone here...
Optimism is the mother of disappointment.

6
tripmon
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/11/14 22:46

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


delete the files in templates_c

7
GPboarder
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/11/15 3:02

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


Thanks.

I deleted all files in the templates_c folder in the root directory then updated the system and user profile modules once again.

Result is the same. Notification email has the proper username and email used at registration but the rest just shows up as the field names, not the data that was entered by the new user.
Optimism is the mother of disappointment.

8
GPboarder
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/11/23 2:33

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


All this attention to my thread had me excited but it is all for a spammer...

Any answers to my original question?
Optimism is the mother of disappointment.

9
ghia
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/11/23 12:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The values of user fields are not provided.
You have to add them yourself in /modules/profile/register.php with eg.
$xoopsMailer->assign('YourFieldName',$newuser->getVar('YourFieldName'));


10
GPboarder
Re: How do I edit the mail to administrators notifying them of a new registration?
  • 2008/11/24 15:15

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


Thanks very much.
Sounds like it might be a little outside of my skills, but I'll give it a whirl.
Optimism is the mother of disappointment.

Login

Who's Online

458 user(s) are online (341 user(s) are browsing Support Forums)


Members: 0


Guests: 458


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits