Database:Users

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Changed message to 'needs to be documented')
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
{{Template:Quicklinks}}
+
{{Quicklinks}}
 
<br />
 
<br />
 
'''users''' ''Stores users profile data''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(back to [[Database Documentation]])
 
'''users''' ''Stores users profile data''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(back to [[Database Documentation]])
Line 73: Line 73:
 
| scopeID|| char(36) || NO || || '00000000-0000-0000-0000-000000000000' ||
 
| scopeID|| char(36) || NO || || '00000000-0000-0000-0000-000000000000' ||
 
|}
 
|}
<br>
+
<br />
<br>
+
<br />
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(back to [[Database Documentation]])
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(back to [[Database Documentation]])
<hr>
+
----
 
;UUID
 
;UUID
 
:The unique id of the user
 
:The unique id of the user
Line 87: Line 87:
  
 
;passwordHash
 
;passwordHash
:The MD5-hash from password and salt
+
:The MD5-hash from password and salt.
 +
:Currently the hash is calculated as follows: md5(md5("password") + ":")
 +
 
 
;passwordSalt
 
;passwordSalt
:The password salt
+
:The password salt. Does not appear to be used at the moment.
  
 
;homeRegion
 
;homeRegion
:The region-handle of the home-region
+
:The region-handle of the home-region.
 +
:The value is the regions X location in a grid times 256*65536 (shifted left by 40 bits) plus the regions Y location in a grid times 256 (shifted left by 8 bits).
  
 
;homeLocationX, homeLocationY, homeLocationZ
 
;homeLocationX, homeLocationY, homeLocationZ
Line 113: Line 116:
  
 
;profileCanDoMask
 
;profileCanDoMask
:<i style="color:red;">needs to be documented</i>
+
:A bitfield where each bit indicates something the avatar can do (their skills list)
 +
:Bit 0 - Textures
 +
:Bit 1 - Architecture
 +
:Bit 2 - Event Planning
 +
:Bit 3 - Modeling
 +
:Bit 4 - Scripting
 +
:Bit 5 - Custom Characters
 +
:<i style="color:red;">NOTE: This information is believed to be accurate but has not been verified</i>
  
 
;profileWantDoMask
 
;profileWantDoMask
:<i style="color:red;">needs to be documented</i>
+
:A bitfield where each bit indicates something the avatar is interested in doing (their "want to" list)
 +
:Bit 0 - Build
 +
:Bit 1 - Explore
 +
:Bit 2 - Meet
 +
:Bit 3 - Group
 +
:Bit 4 - Buy
 +
:Bit 5 - Sell
 +
:Bit 6 - Be Hired
 +
:Bit 7 - Hire
 +
:<i style="color:red;">NOTE: This information is believed to be accurate but has not been verified</i>
  
 
;profileAboutText
 
;profileAboutText
Line 137: Line 156:
  
 
;userFlags
 
;userFlags
 +
:This field consists of two different values. Bit 0-7 are a field of bit flags that define certain characteristics of the user. Bits 8-11 are the user account level, Bits 12-15 are not used.
 +
 
:<i style="color:green;">Account Types:</i>
 
:<i style="color:green;">Account Types:</i>
:<i style="color:blue;">Insert 200 to: Resident:Payment info on account</i>
+
:0 = Normal user (Resident)
:<i style="color:blue;">Insert 300 to: Testing:Payment info on account</i>
+
:1 = Trial Member
:<i style="color:blue;">Insert 400 to: Testing:No payment info on account</i>
+
:2 = Charter Member
:<i style="color:blue;">Insert 600 to: Member Estatute:Payment info on account</i>
+
:3 = Linden Labs Employee
:<i style="color:blue;">Insert 800 to: Linden Contracted</i>
+
 
:<i style="color:red;">New Info by Matpratta (matpratta@gmail.com)[http://opensimulator.org/wiki/How-to]</i>
+
:<i style="color:green;">Bit flags:</i>
 +
:1 (0x01) Allow external services like Google to index the user profile
 +
:2 (0x02) The content of the profile is "mature" and should not appear on web pages children can access
 +
:4 (0x04) The avatar has provided payment info and is therefore identified
 +
:8 (0x08) The avatar has made at least one successful payment using their payment info
 +
:16 (0x10) The avatar is online (This flag has no effect in the database, it is dynamically managed)
 +
:32 (0x20) The avatar has been age verified using some external service (like LL's Aristotle)
  
 
;godLevel
 
;godLevel
Line 163: Line 190:
 
;scopeID
 
;scopeID
 
:<i style="color:red;">needs to be documented</i>
 
:<i style="color:red;">needs to be documented</i>
<br>
+
<br />
<hr>
+
----
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(back to [[Database Documentation]])
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(back to [[Database Documentation]])
<br>
+
<br />
 +
 
 
[[Category:Database]]
 
[[Category:Database]]

Latest revision as of 17:32, 21 June 2016


users Stores users profile data      (back to Database Documentation)

The current structure of the users table is as follows:

Field Type Null Key Default Extra
UUID varchar(36) NO PRI
username varchar(32) NO UNI
lastname varchar(32) NO UNI
passwordHash varchar(32) NO
passwordSalt varchar(32) NO
homeRegion bigint(20) unsigned YES NULL
homeLocationX float YES NULL
homeLocationY float YES NULL
homeLocationZ float YES NULL
homeLookAtX float YES NULL
homeLookAtY float YES NULL
homeLookAtZ float YES NULL
created int(11) NO
lastLogin int(11) NO
userInventoryURI varchar(255) YES NULL
userAssetURI varchar(255) YES NULL
profileCanDoMask int(10) unsigned YES NULL
profileWantDoMask int(10) unsigned YES NULL
profileAboutText text YES NULL
profileFirstText text YES NULL
profileImage varchar(36) YES NULL
profileFirstImage varchar(36) YES NULL
webLoginKey varchar(36) YES NULL
homeRegionID char(36) NO '00000000-0000-0000-0000-000000000000'
userFlags int(11) NO 0
godLevel int(11) NO 0
customType varchar(32) NO
partner char(36) NO '00000000-0000-0000-0000-000000000000'
email varchar(250) YES NULL
scopeID char(36) NO '00000000-0000-0000-0000-000000000000'



      (back to Database Documentation)


UUID
The unique id of the user
username
The first name of the user
lastname
The last name of the user
passwordHash
The MD5-hash from password and salt.
Currently the hash is calculated as follows: md5(md5("password") + ":")
passwordSalt
The password salt. Does not appear to be used at the moment.
homeRegion
The region-handle of the home-region.
The value is the regions X location in a grid times 256*65536 (shifted left by 40 bits) plus the regions Y location in a grid times 256 (shifted left by 8 bits).
homeLocationX, homeLocationY, homeLocationZ
The home-location within the home-region
homeLookAtX, homeLookAtY, homeLookAtZ
The direction the avatar looks after TP to the home-location
created
Creation timestamp of the profile (in seconds since UNIX-epoch (Jan 1st, 1971))
lastLogin
Time of last login (in seconds since UNIX-epoch)
userInventoryURI
needs to be documented
userAssetURI
needs to be documented
profileCanDoMask
A bitfield where each bit indicates something the avatar can do (their skills list)
Bit 0 - Textures
Bit 1 - Architecture
Bit 2 - Event Planning
Bit 3 - Modeling
Bit 4 - Scripting
Bit 5 - Custom Characters
NOTE: This information is believed to be accurate but has not been verified
profileWantDoMask
A bitfield where each bit indicates something the avatar is interested in doing (their "want to" list)
Bit 0 - Build
Bit 1 - Explore
Bit 2 - Meet
Bit 3 - Group
Bit 4 - Buy
Bit 5 - Sell
Bit 6 - Be Hired
Bit 7 - Hire
NOTE: This information is believed to be accurate but has not been verified
profileAboutText
The text in the about field of the profile dialog
profileFirstText
The text in the first-life field of the profile dialog
profileImage
The UUID of the profile image
profileFirstImage
The UUID of the first-life image
webLoginKey
needs to be documented
homeRegionID
The region UUID of the home-region
userFlags
This field consists of two different values. Bit 0-7 are a field of bit flags that define certain characteristics of the user. Bits 8-11 are the user account level, Bits 12-15 are not used.
Account Types:
0 = Normal user (Resident)
1 = Trial Member
2 = Charter Member
3 = Linden Labs Employee
Bit flags:
1 (0x01) Allow external services like Google to index the user profile
2 (0x02) The content of the profile is "mature" and should not appear on web pages children can access
4 (0x04) The avatar has provided payment info and is therefore identified
8 (0x08) The avatar has made at least one successful payment using their payment info
16 (0x10) The avatar is online (This flag has no effect in the database, it is dynamically managed)
32 (0x20) The avatar has been age verified using some external service (like LL's Aristotle)
godLevel
Admins:
Insert 200 to: allow user to get admin level (advanced -> request admin)
New Info by courtneywise
customType
Custom Account Names:
enter what ever you want and it will be show as your user type so you can have custom account types then the default set ones under userFlags
New Info by courtneywise
partner
The UUID of a user that will appear in the partner field of the profile dialog
email
The email address of the user
scopeID
needs to be documented



      (back to Database Documentation)

Personal tools
General
About This Wiki