* refactor: collapse UpdateUserProfileProperties() into existing UpdateUserProfile
* the methods were identical except that the Properties one did a check for the user profile beforehand. However, every caller was doing this already anyway.0.6.0-stable
parent
6791ac3958
commit
ddaa90d270
|
@ -350,7 +350,7 @@ namespace OpenSim.Framework.Communications
|
|||
|
||||
public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile)
|
||||
{
|
||||
m_userService.UpdateUserProfileProperties(UserProfile);
|
||||
m_userService.UpdateUserProfile(UserProfile);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -87,13 +87,6 @@ namespace OpenSim.Framework.Communications
|
|||
/// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
|
||||
void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a user profile
|
||||
/// </summary>
|
||||
/// <param name="UserProfile">Profile to update</param>
|
||||
/// <returns></returns>
|
||||
bool UpdateUserProfileProperties(UserProfileData UserProfile);
|
||||
|
||||
/// <summary>
|
||||
/// Logs off a user on the user server
|
||||
/// </summary>
|
||||
|
|
|
@ -600,29 +600,6 @@ namespace OpenSim.Framework.Communications
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool UpdateUserProfileProperties(UserProfileData UserProfile)
|
||||
{
|
||||
if (null == GetUserProfile(UserProfile.ID))
|
||||
{
|
||||
m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.ID.ToString());
|
||||
return false;
|
||||
}
|
||||
foreach (IUserDataPlugin plugin in _plugins)
|
||||
{
|
||||
try
|
||||
{
|
||||
plugin.UpdateUserProfile(UserProfile);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.ID.ToString()
|
||||
+ " via " + plugin.Name + "(" + 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(UUID uuid);
|
||||
|
|
|
@ -695,7 +695,7 @@ namespace OpenSim.Grid.UserServer
|
|||
}
|
||||
|
||||
// call plugin!
|
||||
bool ret = UpdateUserProfileProperties(userProfile);
|
||||
bool ret = UpdateUserProfile(userProfile);
|
||||
responseData["returnString"] = ret.ToString();
|
||||
response.Value = responseData;
|
||||
return response;
|
||||
|
|
|
@ -475,38 +475,32 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
// TODO
|
||||
public bool UpdateUserProfile(UserProfileData data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool UpdateUserProfileProperties(UserProfileData UserProfile)
|
||||
public bool UpdateUserProfile(UserProfileData userProfile)
|
||||
{
|
||||
m_log.Debug("[OGS1 USER SERVICES]: Asking UserServer to update profile.");
|
||||
Hashtable param = new Hashtable();
|
||||
param["avatar_uuid"] = UserProfile.ID.ToString();
|
||||
//param["AllowPublish"] = UserProfile.ToString();
|
||||
param["FLImageID"] = UserProfile.FirstLifeImage.ToString();
|
||||
param["ImageID"] = UserProfile.Image.ToString();
|
||||
param["avatar_uuid"] = userProfile.ID.ToString();
|
||||
//param["AllowPublish"] = userProfile.ToString();
|
||||
param["FLImageID"] = userProfile.FirstLifeImage.ToString();
|
||||
param["ImageID"] = userProfile.Image.ToString();
|
||||
//param["MaturePublish"] = MaturePublish.ToString();
|
||||
param["AboutText"] = UserProfile.AboutText;
|
||||
param["FLAboutText"] = UserProfile.FirstLifeAboutText;
|
||||
//param["ProfileURL"] = UserProfile.ProfileURL.ToString();
|
||||
param["AboutText"] = userProfile.AboutText;
|
||||
param["FLAboutText"] = userProfile.FirstLifeAboutText;
|
||||
//param["ProfileURL"] = userProfile.ProfileURL.ToString();
|
||||
|
||||
param["home_region"] = UserProfile.HomeRegion.ToString();
|
||||
param["home_region_id"] = UserProfile.HomeRegionID.ToString();
|
||||
param["home_region"] = userProfile.HomeRegion.ToString();
|
||||
param["home_region_id"] = userProfile.HomeRegionID.ToString();
|
||||
|
||||
param["home_pos_x"] = UserProfile.HomeLocationX.ToString();
|
||||
param["home_pos_y"] = UserProfile.HomeLocationY.ToString();
|
||||
param["home_pos_z"] = UserProfile.HomeLocationZ.ToString();
|
||||
param["home_look_x"] = UserProfile.HomeLookAtX.ToString();
|
||||
param["home_look_y"] = UserProfile.HomeLookAtY.ToString();
|
||||
param["home_look_z"] = UserProfile.HomeLookAtZ.ToString();
|
||||
param["user_flags"] = UserProfile.UserFlags.ToString();
|
||||
param["god_level"] = UserProfile.GodLevel.ToString();
|
||||
param["custom_type"] = UserProfile.CustomType.ToString();
|
||||
param["partner"] = UserProfile.Partner.ToString();
|
||||
param["home_pos_x"] = userProfile.HomeLocationX.ToString();
|
||||
param["home_pos_y"] = userProfile.HomeLocationY.ToString();
|
||||
param["home_pos_z"] = userProfile.HomeLocationZ.ToString();
|
||||
param["home_look_x"] = userProfile.HomeLookAtX.ToString();
|
||||
param["home_look_y"] = userProfile.HomeLookAtY.ToString();
|
||||
param["home_look_z"] = userProfile.HomeLookAtZ.ToString();
|
||||
param["user_flags"] = userProfile.UserFlags.ToString();
|
||||
param["god_level"] = userProfile.GodLevel.ToString();
|
||||
param["custom_type"] = userProfile.CustomType.ToString();
|
||||
param["partner"] = userProfile.Partner.ToString();
|
||||
|
||||
IList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
|
@ -535,6 +529,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (m_scene.CommsManager.UserService.UpdateUserProfileProperties(Profile))
|
||||
|
||||
if (m_scene.CommsManager.UserService.UpdateUserProfile(Profile))
|
||||
{
|
||||
RequestAvatarProperty(remoteClient, newProfile.ID);
|
||||
}
|
||||
|
|
|
@ -2254,7 +2254,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
return;
|
||||
}
|
||||
UserProfile.HomeRegionID = info.RegionID;
|
||||
CommsManager.UserService.UpdateUserProfileProperties(UserProfile);
|
||||
CommsManager.UserService.UpdateUserProfile(UserProfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2355,7 +2355,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
UserProfile.HomeRegion = RegionInfo.RegionHandle;
|
||||
UserProfile.HomeLocation = position;
|
||||
UserProfile.HomeLookAt = lookAt;
|
||||
CommsManager.UserService.UpdateUserProfileProperties(UserProfile);
|
||||
CommsManager.UserService.UpdateUserProfile(UserProfile);
|
||||
|
||||
remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue