? Success
Pull Request for # 9390
Referenced as Pull Request for: # 9458

User tests: Successful: Unsuccessful:

avatar alikon
alikon
13 Mar 2016

Pull Request for Issue #9390 .

Summary of Changes

added a check on onUserBeforeSave

Testing Instructions

  1. install staging
  2. go to the plugin manager
  3. enable the plugin "User- Profile"
  4. enable the option "Terms of Service:"
  5. add a article (next option) for Terms of Service. (just one random article)
  6. try to register from the frontend
avatar alikon alikon - open - 13 Mar 2016
avatar alikon alikon - change - 13 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 13 Mar 2016
Category Plugins
avatar brianteeman brianteeman - change - 13 Mar 2016
Rel_Number 0 9390
Relation Type Pull Request for
avatar brianteeman brianteeman - test_item - 13 Mar 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 13 Mar 2016

I have tested this item :white_check_mark: successfully on fabda47


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9405.

avatar brianteeman
brianteeman - comment - 13 Mar 2016

Dont know if programmatically it is good or bad but it works for me

avatar alikon
alikon - comment - 13 Mar 2016

i suspect shuold be handled better on js side .... but i'm not that man ;)

avatar joomla-cms-bot
joomla-cms-bot - comment - 13 Mar 2016

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9405.

avatar zero-24 zero-24 - test_item - 13 Mar 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 13 Mar 2016

I have tested this item :white_check_mark: successfully on 4d88da8

:+1: Works good here! Thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9405.

avatar brianteeman brianteeman - test_item - 13 Mar 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 13 Mar 2016

I have tested this item :white_check_mark: successfully on 4d88da8


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9405.

avatar brianteeman brianteeman - change - 13 Mar 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 13 Mar 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9405.

avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2016
Labels Added: ?
avatar infograf768
infograf768 - comment - 14 Mar 2016

@wilsonge
This should go in as it solves a regression

avatar wilsonge wilsonge - change - 14 Mar 2016
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
avatar wilsonge wilsonge - close - 14 Mar 2016
avatar wilsonge wilsonge - merge - 14 Mar 2016
avatar joomla-cms-bot joomla-cms-bot - close - 14 Mar 2016
avatar wilsonge wilsonge - reference | b9b7629 - 14 Mar 16
avatar wilsonge wilsonge - merge - 14 Mar 2016
avatar wilsonge wilsonge - close - 14 Mar 2016
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2016
Labels Removed: ?
avatar alikon
alikon - comment - 15 Mar 2016

@joomdonation can you check carefully #9439

avatar alikon alikon - head_ref_deleted - 15 Mar 2016
avatar joomdonation
joomdonation - comment - 16 Mar 2016

@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

avatar alikon
alikon - comment - 17 Mar 2016

@joomdonation thx for the review i'll add

if (!empty($data["profile"]["tos"]))
{
// code
}

avatar joomdonation
joomdonation - comment - 17 Mar 2016

Yes @alikon. That will prevent the notice.

avatar infograf768
infograf768 - comment - 17 Mar 2016

Can you make a patch?

avatar alikon
alikon - comment - 17 Mar 2016

I'll do this evening...

avatar joomdonation
joomdonation - comment - 17 Mar 2016

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'));
}
avatar alikon
alikon - comment - 17 Mar 2016

@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' !!!

Add a Comment

Login with GitHub to post a comment