Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Fix for Role Removal from $current_user #49

Merged
merged 1 commit into from
Sep 13, 2016
Merged

Fix for Role Removal from $current_user #49

merged 1 commit into from
Sep 13, 2016

Conversation

amiga-500
Copy link
Collaborator

@amiga-500 amiga-500 commented Sep 13, 2016

When the $current_user is logged in (meaning, they have a user id > 0) they're always guaranteed to have a designated "role". With that in mind one can do away with the ill-advised array_shift() function call, which was unintentionally stripping the active $current_user's role globally, and simply just lookup the 1st element in its "roles" array. #42

When the $current_user is logged in (meaning, they have a user id > 0)
they're always guaranteed to have a designated "role".  With that in
mind one can do away with the ill advised array_shift() function call,
which was unintentionally stripping the active $current_user's role, and
simply just lookup the 1st item in its "roles" array.
@nigrosimone nigrosimone merged commit 837ecc8 into master Sep 13, 2016
@nigrosimone nigrosimone deleted the roles branch September 13, 2016 04:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants