* Override add user for HG user services to hit local services if present
0.6.5-rc1
Justin Clarke Casey 2009-05-04 19:15:44 +00:00
parent 780f57d551
commit b3178c8079
3 changed files with 14 additions and 4 deletions

View File

@ -39,7 +39,7 @@ namespace OpenSim.Framework.Communications
/// </summary> /// </summary>
public class TemporaryUserProfilePlugin : IUserDataPlugin public class TemporaryUserProfilePlugin : IUserDataPlugin
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary<UUID, UserProfileData> m_profiles = new Dictionary<UUID, UserProfileData>(); protected Dictionary<UUID, UserProfileData> m_profiles = new Dictionary<UUID, UserProfileData>();
@ -51,7 +51,7 @@ namespace OpenSim.Framework.Communications
public UserProfileData GetUserByUUID(UUID user) public UserProfileData GetUserByUUID(UUID user)
{ {
m_log.DebugFormat("[TEMP USER PROFILE]: Received request for {0}", user); //m_log.DebugFormat("[TEMP USER PROFILE]: Received request for {0}", user);
lock (m_profiles) lock (m_profiles)
{ {

View File

@ -623,7 +623,7 @@ namespace OpenSim.Framework.Communications
/// <param name="regX">location X</param> /// <param name="regX">location X</param>
/// <param name="regY">location Y</param> /// <param name="regY">location Y</param>
/// <returns>The UUID of the created user profile. On failure, returns UUID.Zero</returns> /// <returns>The UUID of the created user profile. On failure, returns UUID.Zero</returns>
public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY) public virtual UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY)
{ {
return AddUser(firstName, lastName, password, email, regX, regY, UUID.Random()); return AddUser(firstName, lastName, password, email, regX, regY, UUID.Random());
} }
@ -639,7 +639,7 @@ namespace OpenSim.Framework.Communications
/// <param name="regY">location Y</param> /// <param name="regY">location Y</param>
/// <param name="SetUUID">UUID of avatar.</param> /// <param name="SetUUID">UUID of avatar.</param>
/// <returns>The UUID of the created user profile. On failure, returns UUID.Zero</returns> /// <returns>The UUID of the created user profile. On failure, returns UUID.Zero</returns>
public UUID AddUser( public virtual UUID AddUser(
string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID)
{ {
string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);

View File

@ -62,6 +62,16 @@ namespace OpenSim.Region.Communications.Hypergrid
{ {
m_localUserServices = local; m_localUserServices = local;
} }
public override UUID AddUser(
string firstName, string lastName, string password, string email, uint regX, uint regY, UUID uuid)
{
// Only valid to create users locally
if (m_localUserServices != null)
return m_localUserServices.AddUser(firstName, lastName, password, email, regX, regY, uuid);
return UUID.Zero;
}
public override bool AddUserAgent(UserAgentData agentdata) public override bool AddUserAgent(UserAgentData agentdata)
{ {