hasUserProperty
Syntax | hasUserProperty(userNameOrKey, property) | Package | |
Alias | Pkg Usage |
Description
Checks if the user has the given property set.
Parameters
Parameter name | Type | Required | Description |
|---|---|---|---|
userNameOrKey | String | Yes | User name or key of a user to check the property for. |
property | String | Yes | Key of the property to check. |
Return Type
Boolean (true/false)
Returns true if the user has the given property set and false otherwise.
Example
if (hasUserProperty("jdoe", "phone")) {
return getUserProperty("jdoe", "phone");
}