Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeUserFromGroup removes Custom (user) Fields data from user #19735

Closed
Ruud68 opened this issue Feb 19, 2018 · 3 comments
Closed

removeUserFromGroup removes Custom (user) Fields data from user #19735

Ruud68 opened this issue Feb 19, 2018 · 3 comments

Comments

@Ruud68
Copy link
Contributor

Ruud68 commented Feb 19, 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

@Ruud68
Copy link
Contributor Author

Ruud68 commented Feb 19, 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.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/19735

@ghost
Copy link

ghost commented Feb 22, 2018

closed as having Pull Request #19753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants