| '''Errors'''
|{{Error|name|#Errors}} The specified user name is invalid.<br/>{{Error|unknown|#Errors}} The specified user does not exist.<br/>{{Error|password|#Errors}} The specified password is wrong.<br/>
|}
==user:info==
{{Mark|Introduced with Version 8.6}}:
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:info||element(info)}}
|-
| '''Summary'''
|Returns an <code>info</code> element, which contains user-defined information. By default, this element has no contents. It can be modified via [[#user:update-info|user:update-info]].
|-
| '''Examples'''
|
* After a fresh installation, {{Code|user:info()}} returns <code><info/></code>.
|}
| '''Errors'''
|{{Error|unknown|#Errors}} The specified user name is unknown.<br/>{{Error|name|#Errors}} The specified user name is invalid.<br/>{{Error|update|#Errors}} The operation can only be performed once per user or database pattern.
|}
==user:update-info==
{{Mark|Introduced with Version 8.6}}:
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|user:update-info|$info as element(info)|empty-sequence()}}
|-
| '''Summary'''
|Updates the <code>info</code> element with {{Code|$info}}. This node can be used to organize groups and other enhanced user info.
|-
| '''Examples'''
|
* Store initial groups information:
<pre class="brush:xquery">
user:update-info(element info {
for $group in ('editor', 'author', 'writer')
return element group { $group }
})
</pre>
* Assign a group to a new user:
<pre class="brush:xquery">
let $user := 'john', $pw := '8hKJ@%.c/!0O', $group := 'editor'
return (
db:create($user, $pw),
user:update-info(user:info() update
insert node <user name='{ $user }' group='{ $group }'/> into .
)
)
</pre>
|}
;Version 8.6
* Added: [[#user:check|user:check]], [[#user:info|user:info]], [[#user:update-info|user:update-info]].
* Updated: [[#user:list|user:list]], [[#user:list-details|user:list-details]]: If called by non-admins, will only return the current user.