From fe49c96ee0db0974a91b9b175ac1b00aef035797 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Mon, 3 Mar 2008 08:30:36 +0000
Subject: * Applying Ahzz's profile patch. Thanks Ahzz! * Fixed a few bugs in
the patch that are sim crashers. * There's still a bug in mySQL mode/ grid
mode where the main userprofile text doesn't save.
---
.../Communications/CommunicationsManager.cs | 6 +++++
.../Framework/Communications/UserManagerBase.cs | 31 ++++++++++++++++++----
2 files changed, 32 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 4ad808a..655abd7 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -229,6 +229,12 @@ namespace OpenSim.Framework.Communications
#region Packet Handlers
+ public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile)
+ {
+ m_userService.UpdateUserProfileProperties(UserProfile);
+ return;
+ }
+
public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
{
if (uuid == m_userProfileCacheService.libraryRoot.agentID)
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 733d62b..3380e90 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -139,11 +139,10 @@ namespace OpenSim.Framework.UserManagement
}
///
- /// Set's user profile from object
+ /// Set's user profile from data object
///
- /// First name
- /// Last name
- /// A user profile
+ ///
+ ///
public bool setUserProfile(UserProfileData data)
{
foreach (KeyValuePair plugin in _plugins)
@@ -158,7 +157,6 @@ namespace OpenSim.Framework.UserManagement
m_log.Info("[USERSTORAGE]: Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
-
return false;
}
@@ -534,6 +532,29 @@ namespace OpenSim.Framework.UserManagement
return user.UUID;
}
+ public bool UpdateUserProfileProperties(UserProfileData UserProfile)
+ {
+ if (null == GetUserProfile(UserProfile.UUID))
+ {
+ m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.UUID.ToString());
+ return false;
+ }
+ foreach (KeyValuePair plugin in _plugins)
+ {
+ try
+ {
+ plugin.Value.UpdateUserProfile(UserProfile);
+ }
+ catch (Exception e)
+ {
+ m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.UUID.ToString()
+ + " via " + plugin.Key + "(" + e.ToString() + ")");
+ return false;
+ }
+ }
+ return true;
+ }
+
public abstract UserProfileData SetupMasterUser(string firstName, string lastName);
public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password);
public abstract UserProfileData SetupMasterUser(LLUUID uuid);
--
cgit v1.1