Joomla User registration - can't activate account

Windwachter 22 Mar, 2012
Hey guys,
I am having some trouble with the Joomla User Registration action. It is sending the activation emails correctly, with the correct link if I compare it to the jos_users activation column.
But when I press the link, the account is not activated. I assume that the value of block should be transformed from 1 to 0?

I am using Joomla 2.5.3 and Chronoforms V4 RC3.2.
Joomla User Registration:
joomla override: yes
user activation: yes
send activation: yes
random password: no
auto login: no
display status: yes

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


I read some topics on it but no aswers..:
http://www.chronoengine.com/forums.html?cont=posts&f=26&t=44531&p=254443&hilit=joomla+activation+link#p254443

In this topic I found something else..
http://www.chronoengine.com/forums.html?cont=posts&f=26&t=63527&p=265861&hilit=joomla+user+registration+with+activation#p265861

Flip says there is some missing code for $useractivation variable in joomla_registration.php.
I compared it to my code in joomla_registration.php and the elseif (former missing code) is present in my php-file. The only things that are different are:
Flips:
$siteURL.'index.php?option=com_users&task=registration.activate&token='.$user->get('activation'),

Mine at line 215:
$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],


Flips total code is:
 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
         );


Mine total code is:
// Handle account activation/confirmation emails.
		if ($useractivation == 2)
		{
			// Set the link to confirm the user email.
			$uri = JURI::getInstance();
			$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
			$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);

			$emailSubject	= JText::sprintf(
				'COM_USERS_EMAIL_ACCOUNT_DETAILS',
				$data['name'],
				$data['sitename']
			);

			$emailBody = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',
				$data['name'],
				$data['sitename'],
				$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],
				$data['siteurl'],
				$data['username'],
				$data['password_clear']
			);
		}
		else if ($useractivation == 1)
		{
			// Set the link to activate the user account.
			$uri = JURI::getInstance();
			$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
			$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);

			$emailSubject	= JText::sprintf(
				'COM_USERS_EMAIL_ACCOUNT_DETAILS',
				$data['name'],
				$data['sitename']
			);

			$emailBody = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',
				$data['name'],
				$data['sitename'],
				$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],
				$data['siteurl'],
				$data['username'],
				$data['password_clear']
			);
		} else {

			$emailSubject	= JText::sprintf(
				'COM_USERS_EMAIL_ACCOUNT_DETAILS',
				$data['name'],
				$data['sitename']
			);

			$emailBody = JText::sprintf(
				'COM_USERS_EMAIL_REGISTERED_BODY',
				$data['name'],
				$data['sitename'],
				$data['siteurl']
			);
		}


Is the code $data['activation'] wrong and should it be '.$user->get('activation') OR is it something else?

Thanks!
Max_admin 23 Mar, 2012
Hi,

If you have the "Allow users registration" setting turned OFF in the Users manager then you can only activate the accounts using a new form event with the "Activate user" action inside, the latest Chronoforms version has a parameter in the "Joomla registration" action to point the activation link to your new activation event.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Windwachter 26 Mar, 2012
Hey Max,

Nice to add again some new features to Chronoforms! Unfortunately it is still not working for me.
As you said, I:
1: turned OFF the "Allow users registration"
2: created a new event called "Verify"
3: put in the "Joomla user activation" action in the "Verify" event
4: put in the link "action=Verify" in the "Joomla user registration" action on parameter Activation link.

When I tested the email verification with this setup I received a email with the following link:
http://rzvl.nl/action=Verify&token=289976c7d3f68ac84eb3d936de17eca5
The code is correct, it is the same as in the jos_users table, in column "activation" of the particular user. But after clicking the link I got a 404 error page.
Then I turned off Search Engine Friendly URL's and the Use Apache mod_rewrite, and the 404 error page was gone. Strange thing now is that it redirects to the homepage. On Joomla user Activation Succes and Fail I both redirect to different pages. And still I the user is not activated.

What could be wrong?
joshk 28 Mar, 2012

4: put in the link "action=Verify" in the "Joomla user registration" action on parameter Activation link.



This needs to be the relative url to the form. for example (with SEF urls turned on) the link to my form looks like

/index.php/join?chronoform=joinform&event=verify

Thats what should be in the "Activation link" bit.
Windwachter 28 Mar, 2012

This needs to be the relative url to the form. for example (with SEF urls turned on)



Thanks joshk!!

I made several mistakes:
1) The activationlink should not be: action=Verify but &event=Verify
2) I needed to use the relative url to the form instead of only &event=Verify

The complete working Activation link is now:
index.php?option=com_chronoforms&chronoform=Registreren-Load2&event=Verify

Registreren-Load2 is my form name
Verify is my event name after On Submit
rmesman 11 Jul, 2012
Hi,

I'm trying to do the same (which is redirect a newly activated user to special url). Did you manage to get the redirects in the 'Joomla User Activation' working? What is your setting 'Allow default redirects' in the in the 'Joomla User Activation', 'yes' or 'no'?

Robin
Windwachter 11 Jul, 2012
Hey rmesman,

I am a bit confused. Is the activationlink not working, or is it working and after the new user activates his/her account you want to redirect the user to a certain page?

Allow default Redirects is set on 'NO'
The normal Joomla User Activation is working now, the new users just go to the homepage.
It is possible to redirect users to an other page. I used the plugin 'Nomad' for it. But now I don't use the redirect anymore because the hompage is fine for me.
rmesman 16 Jul, 2012
Hi Windwachter,

Yes, the activation link is working, but the redirect isn't. I'm using the Nomad plugin as well now so I don't need a redirect within chronforms anymore. Anyway, thanks for your reply.

~Robin
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger