User tests: Successful: Unsuccessful:
Pull Request for Issue #9390 .
added a check on onUserBeforeSave
- install staging
- go to the plugin manager
- enable the plugin "User- Profile"
- enable the option "Terms of Service:"
- add a article (next option) for Terms of Service. (just one random article)
- try to register from the frontend
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Plugins |
Rel_Number | 0 | ⇒ | 9390 |
Relation Type | ⇒ | Pull Request for |
Dont know if programmatically it is good or bad but it works for me
i suspect shuold be handled better on js side .... but i'm not that man ;)
This PR has received new commits.
CC: @brianteeman
I have tested this item successfully on 4d88da8
Works good here! Thanks
I have tested this item successfully on 4d88da8
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-14 09:09:59 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
@joomdonation can you check carefully #9439
@alikon The issue is still there. If you add this command
error_reporting(E_ALL);
before the command you added. And add this command after the command
exit();
Then edit a user from backend, save it, there will be a notice displayed like this:
Undefined index: tos in E:\www\beta3\plugins\user\profile\profile.php on line 369
@joomdonation thx for the review i'll add
if (!empty($data["profile"]["tos"]))
{
// code
}
Can you make a patch?
I'll do this evening...
Actually, beside the notice, there is still bug in the current code. If tos is required, you won't be able to update your profile in frontend.
We only need to validate tos when user register for an account, so I think we can change the current code to use this new code:
$task = JFactory::getApplication()->input->getCmd('task');
$tosarticle = $this->params->get('register_tos_article');
$tosenabled = $this->params->get('register-require_tos', 0);
if ($task == 'register' && $tosarticle && $tosenabled == 2 && empty($data['profile']['tos']))
{
throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_FIELD_TOS_DESC_SITE'));
}
@infograf768 @joomdonation
please may i have a proof look #9458
If tos is required, you won't be able to update your profile in frontend.
i'm unable to replicate
this is what i get for profile data when visiting profile page index.php/profile?task=profile.save
`
'profile' =>
array (size=11)
'address1' => string '' (length=0)
'address2' => string '' (length=0)
'city' => string '' (length=0)
'region' => string '' (length=0)
'country' => string '' (length=0)
'postal_code' => string '' (length=0)
'phone' => string '' (length=0)
'website' => boolean false
'favoritebook' => string '' (length=0)
'aboutme' => string '' (length=0)
'dob' => string '' (length=0)
`
no 'tos' !!!
I have tested this item successfully on fabda47
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9405.