# is\_user

Source: https://zotonic.com/docs/2519/is_user

URI: https://zotonic.com/id/2519

Language: en



Test if a resource is a user.

A resource is a user when it has at least one identity of a user-defining type. These types are configured with `auth_identity_types`; by default this includes `username_pw`.

The filter accepts a resource id, unique name, or other value accepted by `m_rsc:rid/2`. It returns `true` when the resource exists and is a user, otherwise it returns `false`.

If the resource is not visible to the current user, it will return `false`, even if the resource is a user.

For example:

```django
{% if id|is_user %}
    This resource can log on.
{% endif %}
```

Note that a user does not have to be a person. Any resource can have identities attached to it.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2519?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2519?language=en>)
