March 2017
Beginner
358 pages
9h 51m
English
isMemberOf() is nearly identical in functionality to hasRole(), in that it accepts one argument, and returns a boolean indicating whether the user has membership in that argument. However, rather than checking if the user has a specified role, isMemberOf() checks if the user is a member of a specific group.
This is great for situations where you want to make sure that only certain group members can perform certain actions, but (for some reason) you don't have a role associated specifically with that. For an example of this, see the following code snippet.
Read now
Unlock full access