Syntax
userHasAccessToComment(userNameOrKey, commentId)
Description
Verifies whether a comment is visible for a user.Parameters
Parameter name | Type | Required | Description |
---|---|---|---|
| string | Yes | User name or key of a user to check access for |
commentId | number | Yes | Id of the comment to verify access to |
Return type
boolean (true/false)
Returns true if the specified user has access to the specified comment. Returns false otherwise.
Example
userHasAccessToComment("jdoe", 651);
Checks if the "jdoe" user has access to the comment with id 651.
See also