Fri Oct 31, 2014, 11:50 am
 Locked  7  7592
Showing 1 to 8 of 8 entries.

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:

Code: Select all    
 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:

Code: Select all    
// 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!

24 0
Mon Mar 5, 2012, 3:10 pm

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


If your main question got answered then please select the answer using the GREEN button!

Moderator
11536 14301
Mon Aug 14, 2006, 1:29 am

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?

  • Knipsel.PNG
    Knipsel.PNG (36.55 KiB) Viewed 5799 time(s).
24 0
Mon Mar 5, 2012, 3:10 pm

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

wrote:Windwachter

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.

2 0
Tue Jan 3, 2012, 12:20 am

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

24 0
Mon Mar 5, 2012, 3:10 pm

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

46 0
Sun Nov 9, 2008, 10:47 pm

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.

24 0
Mon Mar 5, 2012, 3:10 pm

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

46 0
Sun Nov 9, 2008, 10:47 pm
Showing 1 to 8 of 8 entries.

Powered by ChronoForums - ChronoEngine.com

ChronoForms Book

The ChronoForms Book, written for ChronoForms v3 contains 350 pages of invaluable ChronoForms How-tos hints and tips.

Note: many of the ideas can be used in ChronoForms v4 but the admin interface is very different and code examples may need to be modified.

SSL

Members Login

 

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com