public
boolean
|
#
addUser( string $username, mixed $passwd = null, mixed $active = null, array $extra = null )
save a user to the user-collection
save a user to the user-collection
This will save the user to the users collection. It will additionally grant the user permissions
for the current database
This will throw if the user cannot be saved
Parameters
- $username
- The name of the user as a string. This is mandatory.
- $passwd
- The user password as a string. If no password is specified, the empty string will be used.
- $active
- an optional flag that specifies whether the user is active. If not specified, this will default to true.
- $extra
- an optional array with arbitrary extra data about the user.
Returns
boolean
- true, if user could be saved
Throws
Since
1.2
|
public
boolean
|
#
replaceUser( string $username, mixed $passwd = null, mixed $active = null, array $extra = null )
Replace an existing user, identified by its username
Replace an existing user, identified by its username
This will replace the user-document on the server
This will throw if the document cannot be replaced
Parameters
- $username
- The name of the user as a string, who's user-data is going to be replaced. This is mandatory.
- $passwd
- The user password as a string. If no password is specified, the empty string will be used.
- $active
- an optional flag that specifies whether the user is active. If not specified, this will default to true.
- $extra
- an optional array with arbitrary extra data about the user.
Returns
boolean
- always true, will throw if there is an error
Throws
|
public
boolean
|
#
updateUser( string $username, mixed $passwd = null, mixed $active = null, array $extra = null )
Update an existing user, identified by the username
Update an existing user, identified by the username
This will update the user-document on the server
This will throw if the document cannot be updated
Parameters
- $username
- The name of the user as a string, who's user-data is going to be updated. This is mandatory.
- $passwd
- The user password as a string. If no password is specified, the empty string will be used.
- $active
- an optional flag that specifies whether the user is active. If not specified, this will default to true.
- $extra
- an optional array with arbitrary extra data about the user.
Returns
boolean
- always true, will throw if there is an error
Throws
|
public
triagens\ArangoDb\User
|
#
get( string $username )
Get a single user-document, identified by the username
Get a single user-document, identified by the username
This will throw if the document cannot be fetched from the server
Parameters
Returns
Throws
|
public
boolean
|
#
removeUser( string $username )
Remove a user, identified by the username
Remove a user, identified by the username
Parameters
- $username
- username as a string, of the user that is to be deleted
Returns
boolean
- always true, will throw if there is an error
Throws
|
public
boolean
|
#
grantPermissions( string $username, string $databaseName )
Grant R/W permissions to a user, for a specific database
Grant R/W permissions to a user, for a specific database
Parameters
- $username
- $databaseName
- name of database as a string
Returns
boolean
- always true, will throw if there is an error
Throws
|
public
boolean
|
#
revokePermissions( string $username, string $databaseName )
Revoke R/W permissions for a user, for a specific database
Revoke R/W permissions for a user, for a specific database
Parameters
- $username
- $databaseName
- name of database as a string
Returns
boolean
- always true, will throw if there is an error
Throws
|
public
array
|
#
getDatabases( string $username )
Gets the list of databases a user has access to
Gets the list of databases a user has access to
Parameters
Returns
array of database names for the databases the user has access to
Throws
|