diff options
author | Teravus Ovares | 2008-09-25 08:42:48 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-25 08:42:48 +0000 |
commit | 17be1b736d438273aa634943629b7f892503744d (patch) | |
tree | 5049b36a26897be3fc186754659c9c5e0b5f1423 /OpenSim/Framework | |
parent | update HttpServer.dll to r15903 (diff) | |
download | opensim-SC-17be1b736d438273aa634943629b7f892503744d.zip opensim-SC-17be1b736d438273aa634943629b7f892503744d.tar.gz opensim-SC-17be1b736d438273aa634943629b7f892503744d.tar.bz2 opensim-SC-17be1b736d438273aa634943629b7f892503744d.tar.xz |
* In Standalone, add a persistant account for the OGP user.
* Gridmode, this has no effect at all.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/CommunicationsManager.cs | 18 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/IUserServiceAdmin.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 9 |
3 files changed, 30 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 198bd83..1bf8c05 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -261,6 +261,24 @@ namespace OpenSim.Framework.Communications | |||
261 | return userProf.ID; | 261 | return userProf.ID; |
262 | } | 262 | } |
263 | } | 263 | } |
264 | |||
265 | public UUID AddUser(string firstName, string lastName, string password, uint regX, uint regY, UUID SetUUID) | ||
266 | { | ||
267 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); | ||
268 | |||
269 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY, SetUUID); | ||
270 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); | ||
271 | if (userProf == null) | ||
272 | { | ||
273 | return UUID.Zero; | ||
274 | } | ||
275 | else | ||
276 | { | ||
277 | InterServiceInventoryService.CreateNewUserInventory(userProf.ID); | ||
278 | m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); | ||
279 | return userProf.ID; | ||
280 | } | ||
281 | } | ||
264 | 282 | ||
265 | /// <summary> | 283 | /// <summary> |
266 | /// Reset a user password | 284 | /// Reset a user password |
diff --git a/OpenSim/Framework/Communications/IUserServiceAdmin.cs b/OpenSim/Framework/Communications/IUserServiceAdmin.cs index 9d1ab9f..169385f 100644 --- a/OpenSim/Framework/Communications/IUserServiceAdmin.cs +++ b/OpenSim/Framework/Communications/IUserServiceAdmin.cs | |||
@@ -35,8 +35,11 @@ namespace OpenSim.Framework.Communications | |||
35 | /// Add a new user profile | 35 | /// Add a new user profile |
36 | /// </summary> | 36 | /// </summary> |
37 | /// <param name="user"></param> | 37 | /// <param name="user"></param> |
38 | UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); | 38 | UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); |
39 | 39 | ||
40 | // Adds one for allowing setting of the UUID from modules.. SHOULD ONLY BE USED in very special circumstances! | ||
41 | UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY, UUID setUUID); | ||
42 | |||
40 | /// <summary> | 43 | /// <summary> |
41 | /// Reset a user password | 44 | /// Reset a user password |
42 | /// </summary> | 45 | /// </summary> |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 46a9b67..b7f9f5a 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -546,9 +546,14 @@ namespace OpenSim.Framework.Communications | |||
546 | /// <param name="user"></param> | 546 | /// <param name="user"></param> |
547 | public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) | 547 | public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) |
548 | { | 548 | { |
549 | return AddUserProfile(firstName, lastName, pass, regX, regY, UUID.Random()); | ||
550 | } | ||
551 | |||
552 | public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY, UUID SetUUID) | ||
553 | { | ||
549 | UserProfileData user = new UserProfileData(); | 554 | UserProfileData user = new UserProfileData(); |
550 | user.HomeLocation = new Vector3(128, 128, 100); | 555 | user.HomeLocation = new Vector3(128, 128, 100); |
551 | user.ID = UUID.Random(); | 556 | user.ID = SetUUID; |
552 | user.FirstName = firstName; | 557 | user.FirstName = firstName; |
553 | user.SurName = lastName; | 558 | user.SurName = lastName; |
554 | user.PasswordHash = pass; | 559 | user.PasswordHash = pass; |
@@ -572,7 +577,7 @@ namespace OpenSim.Framework.Communications | |||
572 | 577 | ||
573 | return user.ID; | 578 | return user.ID; |
574 | } | 579 | } |
575 | 580 | ||
576 | /// <summary> | 581 | /// <summary> |
577 | /// Reset a user password | 582 | /// Reset a user password |
578 | /// </summary> | 583 | /// </summary> |