has_user

Determines if a user exists in ThingsDB.

This function requires GRANT privileges on the @thingsdb scope.

This function does not generate a change.

Function

has_user(username)

Arguments

Argument Type Description
username str (required) User to check.

Return value

Returns true if the user exists and otherwise false.

Example

This code shows an example use case of has_user():

has_user('admin');

Return value in JSON format

true