UserAccountService

=Introduction=

The OpenSimulator user account service stores data such as name, UUID (PrincipalID), UserLevel, etc.data (object items, notecard items, folders, etc.).

This documentation is not complete yet - some more information can be found at UserManipulation.

=API=

Not properly documented yet, but some calling information can be found at UserManipulation.

UserAccount
This has the format

 Jon Snow  12f0e87c-50b1-46c2-892e-facf1ce4a274 00000000-0000-0000-0000-000000000000 1350088195 0 0 <UserTitle/> <LocalToGrid>True</LocalToGrid> <ServiceURLs>HomeURI*;GatekeeperURI*;InventoryServerURI*;AssetServerURI*;</ServiceURLs>

where


 * FirstName is the user's first name.
 * LastName is the user's last name.
 * Email is the user's e-mail. In this case, no e-mail was set.
 * PrincipalID is the user's UUID.
 * ScopeID is the scope to which this user belongs. Unless you are using the undocumented feature of hosting multiple grids in a single database, this will always be 00000000-0000-0000-0000-000000000000 (UUID.Zero).
 * Created is the Unix timestamp of when the user was created.
 * UserLevel is the level of the user. Different levels are given different permissions in OpenSimulator.  Currently, the only levels that are used natively by OpenSimulator are 200, which indicates the user can become a god, 0 which indicates a normal user and a negative number, which normally stops the user from logging in (though the minimum login level can itself be adjusted via the "login level" ROBUST console command or by adjusting MinLoginLevel in the [LoginService] section of Robust.ini
 * UserFlags may be currently unused.
 * UserTitle currently unused.
 * LocalToGrid should be true for all users. May not currently be in use.
 * ServiceURLs service URLs for use by another grid if Hypergrid is turned on and the user goes to another grid.

In cases where multiple accounts can be returned the account element will have an index value appended (e.g. account3 instead of account).

getaccount
This gets a user account that matches a given name or UUID.

When requesting a user account by name, the POST field is a urlencoded string like so

FirstName=tom&LastName=thumb&METHOD=getaccount

If requesting a user account by UUID, then the POST field is encoded like so

UserID=15a040d8-a089-4b53-b82a-df0899564314&METHOD=getaccount

If successful, a server response like

will be returned.

If no matching user is found, then

will be returned.

getaccounts
This gets 0 or more user accounts that match a given name query. This is an extremely old query and so has a few strange features. POST field is a urlencoded string like so

query=tom%20thumb&METHOD=getaccounts

where


 * query is a space separated list of a firstname fragment and a lastname fragment. These can match anywhere in the first and last names.  So "re lins" will match "Fred Flintstone".  A plain % can be used to match any string, so all user accounts can be retrieved with "% %".

If successful, a server response like

will be returned.

If no matching users are found, then

will be returned.

setaccount
This is only available if you have explicitly set

[UserAccountService] AllowSetAccount = true

in Robust.ini. This can currently only safely be done on closed grids (i.e. where you control all simulators).

Here's an example python program to call this. It assumes that your ROBUST services are running on localhost.

PrincipalID is the unique ID of the user. Here, it is used to identify the user that we set up earlier.

If everything goes well, you should get back

Note that the first name has now changed from Jon to Tyrion.

If the call fails you will get the response

createuser
This is only available if you have explicitly set

[UserAccountService] AllowCreateUser = true

in Robust.ini. This can currently only safely be done on closed grids (i.e. where you control all simulators).

You may also want to make sure that you have

[UserAccountService] CreateDefaultAvatarEntries = true

set so that a new user will have the initial minimal body-part/clothing set (skin, shape, eyes, hair, pants, shirt) required for them to appear as anything other than a gas-cloud on Viewer 3 and related third party viewers (viewer version 1 and related third party viewers will show a default "Ruth" avatar instead).

Here's an example python program to call this. It assumes that your ROBUST services are running on localhost.

PrincipalID is the unique ID of the user. Here, it is used to identify the user that we set up earlier.

If everything goes well, you should get back

Note that the first name has now changed from Jon to Tyrion.

If the call fails you will get the response