diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index 098d08e9fb..2f466a32b0 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -112,8 +112,10 @@ namespace OpenSim.Framework.Communications
}
///
- ///
+ /// Get the root folder for a user
///
+ ///
+ /// null if no root folder was found
public InventoryFolderBase RequestUsersRoot(LLUUID userID)
{
foreach (KeyValuePair plugin in m_plugins)
@@ -204,11 +206,27 @@ namespace OpenSim.Framework.Communications
}
}
+ ///
+ /// Create a new set of inventory folders for the given user.
+ ///
+ ///
public void CreateNewUserInventory(LLUUID user)
{
- UsersInventory inven = new UsersInventory();
- inven.CreateNewInventorySet(user);
- AddNewInventorySet(inven);
+ InventoryFolderBase existingRootFolder = RequestUsersRoot(user);
+
+ if (null != existingRootFolder)
+ {
+ MainLog.Instance.Error(
+ "AGENTINVENTORY",
+ "Did not create a new inventory for user {0} since they already have "
+ + "a root inventory folder with id {1}", user, existingRootFolder);
+ }
+ else
+ {
+ UsersInventory inven = new UsersInventory();
+ inven.CreateNewInventorySet(user);
+ AddNewInventorySet(inven);
+ }
}
public class UsersInventory
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index a2849107da..bef20f7160 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -214,7 +214,8 @@ namespace OpenSim.Framework.UserManagement
/// Authenticated?
public virtual bool AuthenticateUser(UserProfileData profile, string password)
{
- MainLog.Instance.Verbose("LOGIN", "Authenticating " + profile.username + " " + profile.surname);
+ MainLog.Instance.Verbose(
+ "LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID);
password = password.Remove(0, 3); //remove $1$