Joomla User Profile Plugin

Category: Joomla 25

puntogenius
Asked:
2013-02-08 1:23 pm EST

Hits: 685
Hi
In my registration form i added the user profile plugin to collect other user informations, what i want to know if possible is how to add these fields to the Admin notification email that actually shows only the username and name of the registered user.

Thanks

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,968 Points
2013-02-08 3:43 pm EST
Hello puntogenius, and thanks for your question.

Unfortunately from what I can tell, I don't believe it's possible to alter your administrative email notifications to also include other information aside from their name, username, and siteurl.

This is because in the /components/com_users/models/registration.php Joomla file it's setting these 3 values as the only ones from the database with this section of code:


//Send Notification mail to administrators

if (($params->get('useractivation') < 2) && ($params->get('mail_to_admin') == 1)) {

$emailSubject = JText::sprintf(

'COM_USERS_EMAIL_ACCOUNT_DETAILS',

$data['name'],

$data['sitename']

);



$emailBodyAdmin = JText::sprintf(

'COM_USERS_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY',

$data['name'],

$data['username'],

$data['siteurl']

);


This correlates to the same COM_USERS_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY option in either the /language/overrides/en-GB.override.ini or /administrator/language/en-GB/en-GB.com_users.ini file, which look like this:


COM_USERS_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY="Hello administrator, \n\nA new user '%s', username '%s', has registered at %s."


Unfortunately adding another %s variable replacement string in this setting does not allow for any new data to get passed, and it actually breaks the admin notifications from my testing.

The other data entered in by the Joomla User Profile plugin ends up in the jos_user_profiles database table, instead of the jos_users table where the registration.php script is setup to pull from.

So you would need to make some heavy modifications to the core Joomla scripts to get it to pull in other data for your admin notifications from what I can tell.

Please let us know if you had any other questions at all.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!