when the register method constructs the user activation URL, it doesn't explicitly enforce a frontend URL. this means that 3rd party extensions wanting to trigger registration (and thus activation emails) from a backend tool cannot make use of the core register method.
since the activation URL is only valid from the frontend, we should always enforce the proper construction.
there are two locations to be modified:
https://github.com/joomla/joomla-cms/blob/staging/components/com_users/models/registration.php#L410
https://github.com/joomla/joomla-cms/blob/staging/components/com_users/models/registration.php#L447
In both cases, we can just include the base url inside JRoute::_() to achieve the enforcement:
$data['activate'] = JRoute::_($base . '/index.php?option=com_users&task=registration.activate&token=' . $data['activation'], false);
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Category | ⇒ | Components Front End |
Thanks! I just going to add your comment and infos there
@lcdservices can you send a pull request with the changes?
This is a simple Doc Page that show the easy way: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests If you whant to do multible file changes you just need to access your branch.
The URL looks like: https://github.com/lcdservices/joomla-cms/tree/patch-1 any changes you apply there will be included into your Pull Request.