diff --git a/plugins/system/fields/fields.php b/plugins/system/fields/fields.php index 3a531df5ff582..f94c94b557585 100644 --- a/plugins/system/fields/fields.php +++ b/plugins/system/fields/fields.php @@ -118,6 +118,14 @@ public function onUserAfterSave($userData, $isNew, $success, $msg) $user = JFactory::getUser($userData['id']); + $task = JFactory::getApplication()->input->getCmd('task'); + + // Skip fields save when we activate a user, because we will lose the saved data + if (in_array($task, array('activate', 'block', 'unblock'))) + { + return true; + } + // Trigger the events with a real user $this->onContentAfterSave('com_users.user', $user, false, $userData);