Closed macroramesh6 closed 4 years ago
I would give the user at least one role, like user
or active
. Then you can check that to see if that user is a current active user.
Roles.userIsInRole(userId, 'active', 'domain1')
or
Roles.userIsInRole(userId, 'user', 'domain1')
I am building a multi-domain website. so the users in a particular domain should not access from the another domain. I can create domain name as a
role
is not a wise idea for huge roles. Sogroups
withoutrole
seems good.I have created a
group
for the user withoutrole
Roles.addUsersToRoles(userId, [], 'domain1');
How should I check this user in the group like.
Roles.userIsInGroup('domain1')