1,578 bytes added
, 23:39, 10 December 2014
This [[Module Library|XQuery Module]] contains functions for creating and administering database users.
=Conventions=
All functions in this module are assigned to the {{Code|http://basex.org/modules/user}} namespace, which is statically bound to the {{Code|user}} prefix.<br/>
All errors are assigned to the {{Code|http://basex.org/errors}} namespace, which is statically bound to the {{Code|bxerr}} prefix.
=Functions=
==user:list==
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:list||xs:string*}}<br/>
|-
| '''Summary'''
|Returns the names of all registered users.
|-
| '''Examples'''
|
* {{Code|admin:list()}} returns all registered users.
|}
==user:list-details==
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:list-details||element(user)*}}<br/>
|-
| '''Summary'''
|Returns an element sequence, containing all registered users, their permissions, and their encoded password strings.<br/>The [[Commands#SHOW_USERS|SHOW USERS]] command yields similar output.
|-
| '''Examples'''
|
* {{Code|admin:list-details()}} returns information on all registered users. By default, it returns the following output:<br/>
<pre class="brush:xml">
<user name="admin" permission="admin">
<password algorithm="digest">
<hash>304bdfb0383c16f070a897fc1eb25cb4</hash>
</password>
<password algorithm="salted-sha256">
<salt>871602799292195</salt>
<hash>a065ca66fa3d6da5762c227587f1c8258c6dc08ee867e44a605a72da115dcb41</hash>
</password>
</user>
</pre>
|}
=Changelog=
The Module was introduced with Version 8.0.
[[Category:XQuery]]