load user, his teams, assigned users with role name #2502
Unanswered
VictoriaNici
asked this question in
Q&A
Replies: 1 comment
-
#2483 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Why this statement not loading user roles for user teams,
at Services/Users/GetUserProfile.php:
$this->user->load(['groups.users.roles']);
I am getting groups(teams), assigned users(belongsToMany relation) but without their roles. Trying different workarounds, nothing works.
also I have this in User model. How can I properly integrate the roleName method within the load statement to retrieve user roles?
at Models/User.php:
It works in foreaches, but how get the roles in load (it also not works, how much I tried).
I want to mention that I applied some custom solutions (use uuids).
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions