aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/UserManager.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
index a312445..fdda63b 100644
--- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
+++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
@@ -53,6 +53,37 @@ namespace OpenGridServices.UserServer
53 } 53 }
54 54
55 /// <summary> 55 /// <summary>
56 ///
57 /// </summary>
58 /// <param name="user"></param>
59 public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
60 {
61 UserProfileData user = new UserProfileData();
62 user.homeLocation = new LLVector3(128, 128, 100);
63 user.UUID = LLUUID.Random();
64 user.username = firstName;
65 user.surname = lastName;
66 user.passwordHash = pass;
67 user.passwordSalt = "";
68 user.created = Util.UnixTimeSinceEpoch();
69 user.homeLookAt = new LLVector3(100, 100, 100);
70 user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
71
72 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
73 {
74 try
75 {
76 plugin.Value.addNewUserProfile(user);
77
78 }
79 catch (Exception e)
80 {
81 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
82 }
83 }
84 }
85
86 /// <summary>
56 /// Loads a user profile from a database by UUID 87 /// Loads a user profile from a database by UUID
57 /// </summary> 88 /// </summary>
58 /// <param name="uuid">The target UUID</param> 89 /// <param name="uuid">The target UUID</param>