Joomla registration sending wrong email

robwent 22 Dec, 2011
Hi,

I have searched everywhere but can't find another post with the same problem.
I have created a form with just name and email and submit (I also read the tutorial). The form submits fine and the form adds the user to the joomla users table.

The problem is that, rather than send the email with the activation link, it sends an email saying:
Hello NAME,

Thank you for registering at WEBSITE.

You may now log in to http://WEBSITE/ using the username and password you registered with.

But no activation link and therefor no email to the administrator to inform of a new user.
I have the following settings with the joomla allow registration set to no (CF v4 J1.7)

joomla override: yes
user activation: yes
send activation: yes
random password: yes
auto login: no
display status: yes

Any help very welcome!

#EDIT - The standard joomla registration form works fine
robwent 22 Dec, 2011
I thought it might be the multi language plugin and disabled it but that made no difference.
I added a debugger to the registration on success event and this is the output. The only thing I can see is the user level is depreciated, the the user is registered as the right type.

Joomla registration sending wrong email image 1
GreyHead 30 Dec, 2011
Hi robwent,

I'm not sure what is happening here.

First, please will you upgrade from CFV4 RC1.9 to RC3.0 in case there have been any bug-fixes that affect this.

Looking at the code if useractivation is set to Yes then the email should use the language file entry COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY; or if not then COM_USERS_EMAIL_REGISTERED_BODY Can you check that these entries look OK in the language file you are using?

Bob
robwent 03 Jan, 2012
Hi Bob,

I've just updated the component and plugin but the same is happening.
The language files look fine (It's pretty much a fresh install):

COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY="Hello %s,\n\nThank you for registering at %s. Your account is created and must be activated before you can use it.\nTo activate the account click on the following link or copy-paste it in your browser:\n%s \n\nAfter activation you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %s"


I've found that if I change the settings in the user manager to registration activation:self then I get the correct email, but I need the registration to be confirmed by the administrator or my site won't function properly.
Also, allow user registration in user manager is set to no and chronoforms should be overriding this, so why do these settings make any difference? Plus, clicking on the activation link sends you to a 403 error and the user is not activated)

Any sugestions very welcome!!

Cheers

Rob
Max_admin 03 Jan, 2012
Hi Rob,

So the problem exists only when you want the admin to manually activate the account ?

What about the 403 error you get when you click the activation link ? this link comes in the user email or the admin email to manually activate ?

Are these all the problem you are having ? please list them in points so I'm able to check all of them.

Thanks!
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
robwent 04 Jan, 2012
Hi Max,

Yes after playing around it seems to be only when admin must approve the email. The settings now are:

USER MANAGER:
allow user registration: no
new user group: registered
new user account activation: self

FORM:
(2 inputs, name and email)
onload: Load css, load html

on submit:
auto server side validation: success - nothing, fail - event loop
joomla user registration: (on success - debugger, on fail - event loop) name field - name, username field - email, email field - email
override joomla registration - yes, user activation - yes, send activation - yes, ran password - yes, auto login - no, display status - yes.
Show thankyou message.

Now when I fill in the form, the standard authentication message is sent to the user. When the user clicks on the activation link they are sent to a 403 error page.

If I change the settings in the user manager for new user activation to admin, an email is sent as if no activation is necessary, so the user cannot activate the account and the admin is never sent an email.

That's basically it. I just want a simple 2 input form to register a new user who activates, then an email is sent to admin to enable the account.

I can send you a form backup or give you admin access if you would like to take a look.

Thanks,

Rob
Max_admin 13 Jan, 2012
Hi Rob,

Yes, please contact me through the "Contact us" page and include a link to this post so I can better test this issue.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Flip 25 Jan, 2012
I have the same issue...
Is there a solution ?
Flip 26 Jan, 2012
Hi,

using CF4 RC3!

i think i figured it out...
There is a missing status for the $useractiviation variable in joomla_registration.php
Original joomla_registration.php:

		if ( $useractivation == 1 ){
			$message = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',
				$name,
				$sitename,
				$siteURL.'index.php?option=com_users&task=registration.activate&token='.$user->get('activation'),
				$siteURL,
				$username,
				$password
			);
			} else {
			$message = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_BODY',
				$name,
				$sitename,
				$siteURL
			);


using this:

		if ( $useractivation == 1 ){
			$message = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',
				$name,
				$sitename,
				$siteURL.'index.php?option=com_users&task=registration.activate&token='.$user->get('activation'),
				$siteURL,
				$username,
				$password
			);
			}
      elseif ( $useractivation == 2 ){
			$message = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',
				$name,
				$sitename,
				$siteURL.'index.php?option=com_users&task=registration.activate&token='.$user->get('activation'),
				$siteURL,
				$username,
				$password
			);	
			//sprintf ( JText::_( 'SEND_MSG_ACTIVATE' ), $name, $sitename, $siteURL."index.php?option=com_user&task=activate&activation=".$user->get('activation'), $siteURL, $username, $password);
		} else {
			$message = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_BODY',
				$name,
				$sitename,
				$siteURL
			);


it works for me now with Admin activation.

There is one thing left!
The redirect to the correct message. But i can't find where the redirect is...
The message should be also informed, that the admin has to be activate the acount.
I hope on help...
Max_admin 29 Jan, 2012
Hi Flip,

Please contact me through the "Contact Us" page to get the latest patch file for this.

And please mention you Joomla version AND the forum link.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
nimerna 01 Feb, 2012
Possible information regarding the 403 problem:

joomla_registration.php checks for Allow User Registration, the Joomla Users Config option. I had set it to 'no', preferring that new users registered through the custom form, but when allowing User Registration the activation link works just fine. I can live with that until I have time to dig deeper into the php...

Hope that helps 🙂
This topic is locked and no more replies can be posted.