Creates a new user to ThingsDB. The new user is created without a password, token and access privileges. You probably want to set a password or add a new token, and assign some privileges using grant(…).
This function requires GRANT
privileges on the @thingsdb
scope.
This function generates a change.
new_user(user)
Argument | Type | Description |
---|---|---|
user |
str (required) | Username, between 1 and 128 graphical characters. |
Returns the new user name
if successful. A lookup_err() is raised
if the user already exists.
Create a new user
iris
:
new_user('iris');
Return value in JSON format (the new user name)
"iris"