?
avatar Ruud68
Ruud68
19 Feb 2018

Steps to reproduce the issue

create custom user fields for a user
Set ACL for these fields to e.g. author ACL level
Add the user to the author group
Add values for this user to the created custom user fields

  1. remove the user from the author group via the back-end user manager
    the user has no access anymore to the custom fields (= correct)
  2. add the user to the author group via the back-end user manager
    the user has access to the fields again and all values that where previously filled in by the user are retained

so far so good... now for the issue

  1. in your code use public static function removeUserFromGroup($userId, $groupId) (UserHelper.php) to remove the user from the author group
    the user is removed from the author group AND all values set for the custom user fields for this user are deleted from the database!
  2. add the user (via back-end) to the author user group
    the user can re-enter (all values are erased!) again

Expected result

The user should be removed from the author user group, but the values in the custom fields should be retained just like when removing the user via the back-end.

Actual result

custom field values should be retained for the user when using public static function removeUserFromGroup($userId, $groupId)

System information (as much as possible)

Joomla 3.8.5

Additional comments

avatar Ruud68 Ruud68 - open - 19 Feb 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Feb 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Feb 2018
Priority Urgent Medium
avatar Ruud68
Ruud68 - comment - 19 Feb 2018

when adding a user via public static function addUserToGroup($userId, $groupId) the also the custom field values for this user are erased.


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Feb 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-02-22 09:14:39
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 22 Feb 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Feb 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Feb 2018

closed as having Pull Request #19753

Add a Comment

Login with GitHub to post a comment