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

Fire OnUserRemoveFromGroup event from user update window #16485

Open
dannyarty opened this issue Oct 19, 2023 · 0 comments
Open

Fire OnUserRemoveFromGroup event from user update window #16485

dannyarty opened this issue Oct 19, 2023 · 0 comments
Labels
feature Request about implementing a brand new function or possibility.

Comments

@dannyarty
Copy link

dannyarty commented Oct 19, 2023

Feature request

Summary

Modx 3.0.4, PHP 7.4
I created a simple plugin and registered it to OnUserRemoveFromGroup event. When I was trying to remove user from a group on the User Update page, the event was not triggered. It fires only when a user is removed from a group while editing it in the ACL context.

Why is it needed?

Most users, especially average site managers, don't use ACL context. Adding and removing user from groups, usually made on User Update window. So it would be great if OnUserRemoveFromGroup event would fire in that case, as OnUserAddToGroup does.

Suggested solution(s)

Compare current user groups and the new ones in the setUserGroups method, which is declared in user update processor.

@dannyarty dannyarty added the feature Request about implementing a brand new function or possibility. label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request about implementing a brand new function or possibility.
Projects
None yet
Development

No branches or pull requests

1 participant