* minor: reduce coupling by passing in only session id to CachedUserInfo
parent
1f7fde9436
commit
58af0fabeb
|
@ -101,11 +101,19 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
m_userProfile = userProfile;
|
||||
}
|
||||
|
||||
public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile, IClientAPI remoteClient)
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commsManager"></param>
|
||||
/// <param name="userProfile"></param>
|
||||
/// <param name="sessionId">
|
||||
/// Session id of the user. This is used in subsequent security checks.
|
||||
/// </param>
|
||||
public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile, LLUUID sessionId)
|
||||
{
|
||||
m_commsManager = commsManager;
|
||||
m_userProfile = userProfile;
|
||||
m_session_id = remoteClient.SessionId;
|
||||
m_session_id = sessionId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
if (!m_userProfiles.ContainsKey(remoteClient.AgentId))
|
||||
{
|
||||
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(remoteClient.AgentId);
|
||||
CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient);
|
||||
CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient.SessionId);
|
||||
|
||||
if (userInfo.UserProfile != null)
|
||||
{
|
||||
|
|
|
@ -689,6 +689,13 @@ namespace OpenSim
|
|||
m_log.ErrorFormat("[CONSOLE]: Failed to find user {0} {1}", firstName, lastName);
|
||||
return;
|
||||
}
|
||||
|
||||
CachedUserInfo userInfo = m_commsManager.UserProfileCacheService.GetUserDetails(userProfile.ID);
|
||||
if (null == userInfo)
|
||||
{
|
||||
m_log.ErrorFormat("[CONSOLE]: Failed to find user info for {0} {1} {2}", firstName, lastName, userProfile.ID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue