I've created a Joomla registration form with CFv7. The user is correctly saved, but I haven't understand how get the activation link and token and how create the activation page.
Anyone can help me?
Thank's
help is appreciated
In the "Save User" action, if success, I've put a read data action to the users table ("read_data_act", model name "atoken"), with the condition "username = save user username",
then i sand a mail to the user with an activation link like this:
https://www.site.com/registrationform.html?chronoform=nameform&gpage=activate&token={var:read_data_act.atoken.activation}
so the link has the joomla generated token and go to a form page ("activate") where i've a read action to the user table with the condition "activation = data:token}" and a save action (if success) that delete data token and set the filed "params" to {"activate":0}
Thanks for the reply. I can use this method to retrieve the Activation string without code change!
But now I ran into the next problem is that I wanted to use the native Joomla registration method (as with the CF4 version) like:
.."?task=registration.activate&token=" and the native Joomla doesn't allow for dashes, underscores etc in the activation code.
(See the J4 RegistrationController.php -> $token = $input->getAlnum('token');)
so I had to change the CF7 generated 'activation' string (by "\G3\L\Str::uuid()" and remove the '-' characters
But maybe I'm missing something..
what is the full url of the native joomla activation ?
www.site.com/index.php?option=com_users&view=registration&task=registration.activate&token=<activation_token>
regards,
Peter
Activation token without '-' would be nice to comply with J4 default!
Just saw CF8 is available, will start using it tonight and let you know!
thanks
