concrete5/concrete5 — pull request #1071 by mkly (2013-06-05 16:43:33+00:00)
Title: Use API Methods for Group Removal

User API methods for group removal in `User::_getUserGroups()`

- Change from SQL query to `User::exitGroup()`
- Change from SQL query to `UserInfo::deactivate()`
- Refactor to switch statement for readability

This also has the added benefit of causing events `on_user_deactivate`
and `on_user_exit_group`. The latter is very helpful when dealing with
group memberships.