diff options
author | Charles Krinke | 2008-11-23 03:38:40 +0000 |
---|---|---|
committer | Charles Krinke | 2008-11-23 03:38:40 +0000 |
commit | 02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8 (patch) | |
tree | f95a3170f3dd41be8ccf10957aef7209492a0279 /OpenSim/Framework | |
parent | Add error handling to catch the WebExceptions thrown if you have (diff) | |
download | opensim-SC-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.zip opensim-SC-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.tar.gz opensim-SC-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.tar.bz2 opensim-SC-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.tar.xz |
Mantis#2660. Thank you kindly, Ruud Lathrop for a patch that:
This patch adds the option of adding the email when you create
a new user. This works in Gridmode as none Gridmode. This
option is also added to RemoteAdminPlugin. With a new handler
you can create a user with a email.
Diffstat (limited to 'OpenSim/Framework')
4 files changed, 70 insertions, 22 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index bb4a853..3f46776 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -255,14 +255,15 @@ namespace OpenSim.Framework.Communications | |||
255 | /// <param name="firstName"></param> | 255 | /// <param name="firstName"></param> |
256 | /// <param name="lastName"></param> | 256 | /// <param name="lastName"></param> |
257 | /// <param name="password"></param> | 257 | /// <param name="password"></param> |
258 | /// <param name="email"></param> | ||
258 | /// <param name="regX"></param> | 259 | /// <param name="regX"></param> |
259 | /// <param name="regY"></param> | 260 | /// <param name="regY"></param> |
260 | /// <returns>The UUID of the added user. Returns UUID.Zero if the add was unsuccessful</returns> | 261 | /// <returns>The UUID of the added user. Returns UUID.Zero if the add was unsuccessful</returns> |
261 | public UUID AddUser(string firstName, string lastName, string password, uint regX, uint regY) | 262 | public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY) |
262 | { | 263 | { |
263 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); | 264 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); |
264 | 265 | ||
265 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY); | 266 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY); |
266 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); | 267 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); |
267 | if (userProf == null) | 268 | if (userProf == null) |
268 | { | 269 | { |
@@ -276,11 +277,22 @@ namespace OpenSim.Framework.Communications | |||
276 | } | 277 | } |
277 | } | 278 | } |
278 | 279 | ||
279 | public UUID AddUser(string firstName, string lastName, string password, uint regX, uint regY, UUID SetUUID) | 280 | /// <summary> |
281 | /// Adds the user. | ||
282 | /// </summary> | ||
283 | /// <param name="firstName">The first name.</param> | ||
284 | /// <param name="lastName">The last name.</param> | ||
285 | /// <param name="password">The password.</param> | ||
286 | /// <param name="email">The email.</param> | ||
287 | /// <param name="regX">The reg X.</param> | ||
288 | /// <param name="regY">The reg Y.</param> | ||
289 | /// <param name="SetUUID">The set UUID.</param> | ||
290 | /// <returns></returns> | ||
291 | public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) | ||
280 | { | 292 | { |
281 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); | 293 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); |
282 | 294 | ||
283 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY, SetUUID); | 295 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY, SetUUID); |
284 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); | 296 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); |
285 | if (userProf == null) | 297 | if (userProf == null) |
286 | { | 298 | { |
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs index 50c9917..178b5a0 100644 --- a/OpenSim/Framework/Communications/IUserService.cs +++ b/OpenSim/Framework/Communications/IUserService.cs | |||
@@ -35,15 +35,15 @@ namespace OpenSim.Framework.Communications | |||
35 | /// <summary> | 35 | /// <summary> |
36 | /// Loads a user profile by name | 36 | /// Loads a user profile by name |
37 | /// </summary> | 37 | /// </summary> |
38 | /// <param name="fname">First name</param> | 38 | /// <param name="firstName">First name</param> |
39 | /// <param name="lname">Last name</param> | 39 | /// <param name="lastName">Last name</param> |
40 | /// <returns>A user profile. Returns null if no profile is found</returns> | 40 | /// <returns>A user profile. Returns null if no profile is found</returns> |
41 | UserProfileData GetUserProfile(string firstName, string lastName); | 41 | UserProfileData GetUserProfile(string firstName, string lastName); |
42 | 42 | ||
43 | /// <summary> | 43 | /// <summary> |
44 | /// Loads a user profile from a database by UUID | 44 | /// Loads a user profile from a database by UUID |
45 | /// </summary> | 45 | /// </summary> |
46 | /// <param name="uuid">The target UUID</param> | 46 | /// <param name="userId">The target UUID</param> |
47 | /// <returns>A user profile. Returns null if no user profile is found.</returns> | 47 | /// <returns>A user profile. Returns null if no user profile is found.</returns> |
48 | UserProfileData GetUserProfile(UUID userId); | 48 | UserProfileData GetUserProfile(UUID userId); |
49 | 49 | ||
@@ -90,8 +90,8 @@ namespace OpenSim.Framework.Communications | |||
90 | /// <summary> | 90 | /// <summary> |
91 | /// Logs off a user on the user server | 91 | /// Logs off a user on the user server |
92 | /// </summary> | 92 | /// </summary> |
93 | /// <param name="UserID">UUID of the user</param> | 93 | /// <param name="userid">UUID of the user</param> |
94 | /// <param name="regionID">UUID of the Region</param> | 94 | /// <param name="regionid">UUID of the Region</param> |
95 | /// <param name="regionhandle">regionhandle</param> | 95 | /// <param name="regionhandle">regionhandle</param> |
96 | /// <param name="position">final position</param> | 96 | /// <param name="position">final position</param> |
97 | /// <param name="lookat">final lookat</param> | 97 | /// <param name="lookat">final lookat</param> |
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Communications | |||
100 | /// <summary> | 100 | /// <summary> |
101 | /// Logs off a user on the user server (deprecated as of 2008-08-27) | 101 | /// Logs off a user on the user server (deprecated as of 2008-08-27) |
102 | /// </summary> | 102 | /// </summary> |
103 | /// <param name="UserID">UUID of the user</param> | 103 | /// <param name="userid">UUID of the user</param> |
104 | /// <param name="regionID">UUID of the Region</param> | 104 | /// <param name="regionid">UUID of the Region</param> |
105 | /// <param name="regionhandle">regionhandle</param> | 105 | /// <param name="regionhandle">regionhandle</param> |
106 | /// <param name="posx">final position x</param> | 106 | /// <param name="posx">final position x</param> |
107 | /// <param name="posy">final position y</param> | 107 | /// <param name="posy">final position y</param> |
@@ -118,7 +118,8 @@ namespace OpenSim.Framework.Communications | |||
118 | /// Updates the current region the User is in | 118 | /// Updates the current region the User is in |
119 | /// </summary> | 119 | /// </summary> |
120 | /// <param name="avatarid">User Region the Avatar is IN</param> | 120 | /// <param name="avatarid">User Region the Avatar is IN</param> |
121 | /// <param name="retionuuid">User Region the Avatar is IN</param> | 121 | /// <param name="regionuuid">User Region the Avatar is IN</param> |
122 | /// <param name="regionhandle">User region handle</param> | ||
122 | void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle); | 123 | void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle); |
123 | 124 | ||
124 | /// <summary> | 125 | /// <summary> |
diff --git a/OpenSim/Framework/Communications/IUserServiceAdmin.cs b/OpenSim/Framework/Communications/IUserServiceAdmin.cs index 169385f..a120add 100644 --- a/OpenSim/Framework/Communications/IUserServiceAdmin.cs +++ b/OpenSim/Framework/Communications/IUserServiceAdmin.cs | |||
@@ -30,15 +30,31 @@ using OpenMetaverse; | |||
30 | namespace OpenSim.Framework.Communications | 30 | namespace OpenSim.Framework.Communications |
31 | { | 31 | { |
32 | public interface IUserServiceAdmin | 32 | public interface IUserServiceAdmin |
33 | { | 33 | { |
34 | /// <summary> | 34 | /// <summary> |
35 | /// Add a new user profile | 35 | /// Add a new user profile |
36 | /// </summary> | 36 | /// </summary> |
37 | /// <param name="user"></param> | 37 | /// <param name="firstName">The first name.</param> |
38 | UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); | 38 | /// <param name="lastName">The last name.</param> |
39 | /// <param name="pass">password of avatar</param> | ||
40 | /// <param name="email">email of user</param> | ||
41 | /// <param name="regX">region X.</param> | ||
42 | /// <param name="regY">region Y.</param> | ||
43 | /// <returns></returns> | ||
44 | UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY); | ||
39 | 45 | ||
40 | // Adds one for allowing setting of the UUID from modules.. SHOULD ONLY BE USED in very special circumstances! | 46 | /// <summary> |
41 | UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY, UUID setUUID); | 47 | /// Adds one for allowing setting of the UUID from modules.. SHOULD ONLY BE USED in very special circumstances! |
48 | /// </summary> | ||
49 | /// <param name="firstName">The first name.</param> | ||
50 | /// <param name="lastName">The last name.</param> | ||
51 | /// <param name="pass">password of avatar</param> | ||
52 | /// <param name="email">email of user</param> | ||
53 | /// <param name="regX">region X.</param> | ||
54 | /// <param name="regY">region Y.</param> | ||
55 | /// <param name="setUUID">The set UUID.</param> | ||
56 | /// <returns></returns> | ||
57 | UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY, UUID setUUID); | ||
42 | 58 | ||
43 | /// <summary> | 59 | /// <summary> |
44 | /// Reset a user password | 60 | /// Reset a user password |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 4b5d2bb..bc1a593 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Framework.Communications | |||
54 | /// Adds a new user server plugin - user servers will be requested in the order they were loaded. | 54 | /// Adds a new user server plugin - user servers will be requested in the order they were loaded. |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <param name="provider">The filename to the user server plugin DLL</param> | 56 | /// <param name="provider">The filename to the user server plugin DLL</param> |
57 | /// <param name="connect"></param> | ||
57 | public void AddPlugin(string provider, string connect) | 58 | public void AddPlugin(string provider, string connect) |
58 | { | 59 | { |
59 | PluginLoader<IUserDataPlugin> loader = | 60 | PluginLoader<IUserDataPlugin> loader = |
@@ -580,15 +581,32 @@ namespace OpenSim.Framework.Communications | |||
580 | #endregion | 581 | #endregion |
581 | 582 | ||
582 | /// <summary> | 583 | /// <summary> |
583 | /// | 584 | /// Add a new user profile |
584 | /// </summary> | 585 | /// </summary> |
585 | /// <param name="user"></param> | 586 | /// <param name="firstName">first name.</param> |
586 | public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) | 587 | /// <param name="lastName">last name.</param> |
588 | /// <param name="pass">password</param> | ||
589 | /// <param name="email">email.</param> | ||
590 | /// <param name="regX">location X.</param> | ||
591 | /// <param name="regY">location Y.</param> | ||
592 | /// <returns></returns> | ||
593 | public UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY) | ||
587 | { | 594 | { |
588 | return AddUserProfile(firstName, lastName, pass, regX, regY, UUID.Random()); | 595 | return AddUserProfile(firstName, lastName, pass, email, regX, regY, UUID.Random()); |
589 | } | 596 | } |
590 | 597 | ||
591 | public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY, UUID SetUUID) | 598 | /// <summary> |
599 | /// Adds the user profile. | ||
600 | /// </summary> | ||
601 | /// <param name="firstName">first name.</param> | ||
602 | /// <param name="lastName">last name.</param> | ||
603 | /// <param name="pass">password</param> | ||
604 | /// <param name="email">email.</param> | ||
605 | /// <param name="regX">location X.</param> | ||
606 | /// <param name="regY">location Y.</param> | ||
607 | /// <param name="SetUUID">UUID of avatar.</param> | ||
608 | /// <returns></returns> | ||
609 | public UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY, UUID SetUUID) | ||
592 | { | 610 | { |
593 | UserProfileData user = new UserProfileData(); | 611 | UserProfileData user = new UserProfileData(); |
594 | user.HomeLocation = new Vector3(128, 128, 100); | 612 | user.HomeLocation = new Vector3(128, 128, 100); |
@@ -601,6 +619,7 @@ namespace OpenSim.Framework.Communications | |||
601 | user.HomeLookAt = new Vector3(100, 100, 100); | 619 | user.HomeLookAt = new Vector3(100, 100, 100); |
602 | user.HomeRegionX = regX; | 620 | user.HomeRegionX = regX; |
603 | user.HomeRegionY = regY; | 621 | user.HomeRegionY = regY; |
622 | user.Email = email; | ||
604 | 623 | ||
605 | foreach (IUserDataPlugin plugin in _plugins) | 624 | foreach (IUserDataPlugin plugin in _plugins) |
606 | { | 625 | { |