IsUserInRole function
Syntax
IsUserInRole(role1[, role2]. . .)
Description
Use the IsUserInRole function to return a boolean value indicating whether the user is a member of any of the specified list of roles.
This function also returns true when an alias exists for a role and the user is a member of the role alias. See Security Administration: Using Role and Permission List Aliases.
Parameters
| Parameter | Description |
|---|---|
|
role1[, role2]. . . |
An arbitrary-length list of strings, each of which represents a role. |
Returns
Returns a boolean value: True if the current user belongs to one or more of the roles, False otherwise.
Example
While &selectSQL1.Fetch(&sRoleNames)
If (IsUserInRole(&sRoleNames) = True) Then
&found = &sRoleNames;
Break;
End-If;
End-While;