aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/UserProfileManagerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.Framework/UserProfileManagerBase.cs')
-rw-r--r--OpenSim.Framework/UserProfileManagerBase.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim.Framework/UserProfileManagerBase.cs b/OpenSim.Framework/UserProfileManagerBase.cs
index 73f325d..c022feb 100644
--- a/OpenSim.Framework/UserProfileManagerBase.cs
+++ b/OpenSim.Framework/UserProfileManagerBase.cs
@@ -28,6 +28,22 @@ namespace OpenSim.Framework.User
28 db.Close(); 28 db.Close();
29 } 29 }
30 30
31 public virtual void SaveUserProfiles() // ZOMG! INEFFICIENT!
32 {
33 IObjectContainer db;
34 db = Db4oFactory.OpenFile("userprofiles.yap");
35 IObjectSet result = db.Get(typeof(UserProfile));
36 foreach (UserProfile userprof in result) {
37 db.Delete(userprof);
38 db.Commit();
39 }
40 foreach (UserProfile userprof in UserProfiles.Values) {
41 db.Set(userprof);
42 db.Commit();
43 }
44 db.Close();
45 }
46
31 public UserProfile GetProfileByName(string firstname, string lastname) 47 public UserProfile GetProfileByName(string firstname, string lastname)
32 { 48 {
33 foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys) 49 foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys)
@@ -86,8 +102,8 @@ namespace OpenSim.Framework.User
86 newprofile.UUID = LLUUID.Random(); 102 newprofile.UUID = LLUUID.Random();
87 newprofile.Inventory.CreateRootFolder(newprofile.UUID, true); 103 newprofile.Inventory.CreateRootFolder(newprofile.UUID, true);
88 this.UserProfiles.Add(newprofile.UUID, newprofile); 104 this.UserProfiles.Add(newprofile.UUID, newprofile);
89 return newprofile; 105 return newprofile;
90 } 106 }
91 107
92 public virtual AgentInventory GetUsersInventory(LLUUID agentID) 108 public virtual AgentInventory GetUsersInventory(LLUUID agentID)
93 { 109 {