Problem/Motivation
- Adding a new role overwrote the previous due to this line $roles = array_map(function($role) { return $role->target_id; }, $this->get('roles'));
- Also threw an error
Steps to reproduce
- Add a new role via the People view actions or programmatically
Proposed resolution
- Fix the use of $this->get('roles')
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | domain_role-incorrect_get_roles-3203097-5.patch | 1011 bytes | kimberleycgm |
Comments
Comment #2
kimberleycgmComment #3
kimberleycgmUpdated the patch to use the same basic method the original code was using, just updated to the correct format. Previous patch was resulting in some users getting the 'anonymous' role when adding a role when creating a user using User::create()
Comment #4
kimberleycgmComment #5
kimberleycgmSame for removing a role, patch updated
Comment #6
freelockThanks for the patch! Committed.