The Joomla! Forum ™



Forum rules


Please use the official Bug Tracker to report a bug: http://joomlacode.org/gf/project/joomla ... er_id=8103



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Jun 23, 2012 3:51 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Mar 01, 2008 6:41 pm
Posts: 10
What is the error: when the user tries to save his/her profile and the data is incorrect and not validate the information posted is lost.

How to see it: if you use any profile plugin it is pretty simple to see this error. Just try to save any incorrect value; when joomla prompts the error messages you can see that the data posted is lost.

How to fix it: the save function sets the userstate with the value returned from jform->validate. The save function of the registration controller does not have the same flaw and can be used as a model (corrections highlighted below):

new line 83:
Code:
$requestData = JRequest::getVar('jform', array(), 'post', 'array');


new line 96:
Code:
$data = $model->validate($form, $requestData);


new line 113:
Code:
$app->setUserState('com_users.edit.profile.data', $requestData);


It is just a small change of the variables names.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group