---
title: "userHasAccessToComment"
canonical: "https://support.appfire.com/space/PSJ/15483735/userHasAccessToComment"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | userHasAccessToComment(user, comment_id) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Verifies if a comment is visible for an user.

Verifies if a comment is visible for an user.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| user | String | Yes | Username or userkey of the user. |
| comment_id | Number | Yes | Id of the comment. |

## Return Type

**Boolean**

A "true" return value means that the user can see the comment.

## Example

```
userHasAccessToComment("admin","10000");
```

Returns "true" if the user "admin" can see the comment with id "10000" and "false" if the user cannot see the comment.

> ⚠️ The look-up is first made after the userkey, then after the username.

## See also

> Macro (contentbylabel)