diff --git a/OpenSim/Data/IUserData.cs b/OpenSim/Data/IUserData.cs index 9ac923fc1e..573355bfc1 100644 --- a/OpenSim/Data/IUserData.cs +++ b/OpenSim/Data/IUserData.cs @@ -64,7 +64,7 @@ namespace OpenSim.Data /// /// ID associated with the user's query. This must match what the client sent /// The filtered contents of the search box when the user hit search. - /// The user data profile + /// A list of user details. If there are no results than either an empty list or null can be returned List GeneratePickerResults(UUID queryID, string query); /// diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 3b43622c92..a269b598c7 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -174,44 +174,46 @@ namespace OpenSim.Framework.Communications public virtual List GenerateAgentPickerRequestResponse(UUID queryID, string query) { - List pickerlist = new List(); + List allPickerList = new List(); + foreach (IUserDataPlugin plugin in m_plugins) { try { - pickerlist = plugin.GeneratePickerResults(queryID, query); + List pickerList = plugin.GeneratePickerResults(queryID, query); + if (pickerList != null) + allPickerList.AddRange(pickerList); } catch (Exception) { - m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Name + "(" + query + ")"); - return new List(); + m_log.Error( + "[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Name + "(" + query + ")"); } } - return pickerlist; + return allPickerList; } - - /// - /// Updates a user profile from data object - /// - /// - /// + public virtual bool UpdateUserProfile(UserProfileData data) { + bool result = false; + foreach (IUserDataPlugin plugin in m_plugins) { try { plugin.UpdateUserProfile(data); - return true; + result = true; } catch (Exception e) { - m_log.InfoFormat("[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", data.FirstName, data.SurName, - plugin.Name, e.ToString()); + m_log.InfoFormat( + "[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", + data.FirstName, data.SurName, plugin.Name, e.ToString()); } } - return false; + + return result; } #endregion @@ -232,9 +234,7 @@ namespace OpenSim.Framework.Communications UserAgentData result = plugin.GetAgentByUUID(uuid); if (result != null) - { return result; - } } catch (Exception e) { @@ -256,7 +256,10 @@ namespace OpenSim.Framework.Communications { try { - return plugin.GetAgentByName(name); + UserAgentData result = plugin.GetAgentByName(name); + + if (result != null) + return result; } catch (Exception e) { @@ -279,7 +282,10 @@ namespace OpenSim.Framework.Communications { try { - return plugin.GetAgentByName(fname, lname); + UserAgentData result = plugin.GetAgentByName(fname, lname); + + if (result != null) + return result; } catch (Exception e) { @@ -304,9 +310,7 @@ namespace OpenSim.Framework.Communications List result = plugin.GetUserFriendList(ownerID); if (result != null) - { return result; - } } catch (Exception e) { @@ -326,9 +330,7 @@ namespace OpenSim.Framework.Communications Dictionary result = plugin.GetFriendRegionInfos(uuids); if (result != null) - { return result; - } } catch (Exception e) {