* 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.
This commit is contained in:
Justin Clarke Casey
2008-09-15 19:02:34 +00:00
parent 6791ac3958
commit ddaa90d270
7 changed files with 27 additions and 61 deletions

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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);