fix creators user cache

This commit is contained in:
UbitUmarov
2021-01-07 21:52:41 +00:00
parent 6bcba59439
commit 70e00a00ec
2 changed files with 10 additions and 4 deletions

View File

@@ -145,6 +145,11 @@ namespace OpenSim.Framework
get { return Flags == OSHTTPURIFlags.None ? "" : URI + "/";} get { return Flags == OSHTTPURIFlags.None ? "" : URI + "/";}
} }
public string HostAndPort
{
get { return (Flags == OSHTTPURIFlags.None) ? "" : Host + ":" + Port.ToString(); }
}
public int CompareTo(OSHTTPURI other) public int CompareTo(OSHTTPURI other)
{ {
if (Port == other.Port && ((Flags & other.Flags) & OSHTTPURIFlags.ValidHost) != 0) if (Port == other.Port && ((Flags & other.Flags) & OSHTTPURIFlags.ValidHost) != 0)

View File

@@ -1086,9 +1086,10 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
oldUser.HasGridUserTried = false; oldUser.HasGridUserTried = false;
oldUser.IsUnknownUser = false; oldUser.IsUnknownUser = false;
if (CheckUrl(homeURL, out bool local, out OSHHTPHost host)) OSHTTPURI homeuri = new OSHTTPURI(homeURL);
if (homeuri.IsValidHost)
{ {
if (local) if (m_thisGridInfo.IsLocalGrid(homeuri.URL) == 1) // local
{ {
oldUser.FirstName = firstname; oldUser.FirstName = firstname;
oldUser.LastName = lastname; oldUser.LastName = lastname;
@@ -1099,8 +1100,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
else else
{ {
oldUser.FirstName = firstname + "." + lastname.Replace(" ", "."); oldUser.FirstName = firstname + "." + lastname.Replace(" ", ".");
oldUser.LastName = "@" + host.HostAndPort; oldUser.LastName = "@" + homeuri.HostAndPort;
oldUser.HomeURL = host.URI; oldUser.HomeURL = homeuri.URL;
oldUser.IsLocal = false; oldUser.IsLocal = false;
} }
} }