Skip to content

Commit

Permalink
Also normalise request data on front-end user profile save (#10)
Browse files Browse the repository at this point in the history
* Also normalise request data on front-end user profile save

* correct context and option
  • Loading branch information
Ruud68 authored and laoneo committed Mar 12, 2018
1 parent 2040b53 commit 5db8f95
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/com_users/controllers/profile.php
Expand Up @@ -113,6 +113,14 @@ public function save()
return false;
}

// Send an object which can be modified through the plugin event
$objData = (object) $requestData;
$app->triggerEvent(
'onContentNormaliseRequestData',
array('com_users.user', $objData, $form)
);
$requestData = (array) $objData;

// Validate the posted data.
$data = $model->validate($form, $requestData);

Expand Down

0 comments on commit 5db8f95

Please sign in to comment.