From 55b569069dfd6eb7c87d4fbd66d68083878f6c65 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Tue, 31 Jul 2007 14:42:50 +0000
Subject: clear userAgent state on client shutdown, which fixes the issue where
you could only login once with a given id in standalone mode.
---
OpenSim/Framework/UserManager/UserManagerBase.cs | 31 ++++++++++++++++++++++++
1 file changed, 31 insertions(+)
(limited to 'OpenSim/Framework/UserManager')
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs
index bc923b6..61b5df4 100644
--- a/OpenSim/Framework/UserManager/UserManagerBase.cs
+++ b/OpenSim/Framework/UserManager/UserManagerBase.cs
@@ -155,6 +155,28 @@ namespace OpenSim.Framework.UserManagement
return null;
}
+
+ ///
+ /// Set's user profile from object
+ ///
+ /// First name
+ /// Last name
+ /// A user profile
+ public bool setUserProfile(UserProfileData data)
+ {
+ foreach (KeyValuePair 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);
+ }
+
+
///
/// Loads a user agent by name (not called directly)
///
--
cgit v1.1