clear userAgent state on client shutdown, which fixes the issue

where you could only login once with a given id in standalone mode.
This commit is contained in:
Sean Dague
2007-07-31 14:42:50 +00:00
parent 7db7ad0722
commit 55b569069d
8 changed files with 84 additions and 12 deletions

View File

@@ -155,6 +155,28 @@ namespace OpenSim.Framework.UserManagement
return null;
}
/// <summary>
/// Set's user profile from object
/// </summary>
/// <param name="fname">First name</param>
/// <param name="lname">Last name</param>
/// <returns>A user profile</returns>
public bool setUserProfile(UserProfileData data)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try {
plugin.Value.updateUserProfile(data);
return true;
} catch (Exception e) {
MainLog.Instance.Verbose( "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return false;
}
#endregion
#region Get UserAgent
@@ -202,6 +224,15 @@ namespace OpenSim.Framework.UserManagement
return null;
}
// TODO: document
public void clearUserAgent(LLUUID agentID)
{
UserProfileData profile = getUserProfile(agentID);
profile.currentAgent = null;
setUserProfile(profile);
}
/// <summary>
/// Loads a user agent by name (not called directly)
/// </summary>