currentUser.php
Table of Contents
Functions
- currentUser() : string
- Return the name of the current user.
Functions
currentUser()
Return the name of the current user.
currentUser() : string
TThe current user is the user account name that was specified in the Authorization HTTP header of the request. It will only be populated if authentication on the server is turned on, and if the query was executed inside a request context. Otherwise, the return value of this function will be null.
Returns userName (string|null): the current user name, or null if authentication is disabled
This helper wraps the ArangoDB AQL function CURRENT_USER().
Example AQL output:
CURRENT_USER()
Tags
Return values
string —The formatted AQL expression (e.g. 'CURRENT_USER()').