MANTIS-7684 - Use the user management module to get username for script dialogs
Signed-off-by: Diva Canto <diva@metaverseink.com>0.8.2-post-fixes
parent
ce2aeb8424
commit
fc6fe75268
|
@ -133,13 +133,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
UUID objectID, UUID ownerID, string message, UUID textureID,
|
||||
int ch, string[] buttonlabels)
|
||||
{
|
||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(
|
||||
m_scene.RegionInfo.ScopeID, ownerID);
|
||||
string username = m_scene.UserManagementModule.GetUserName(ownerID);
|
||||
string ownerFirstName, ownerLastName;
|
||||
if (account != null)
|
||||
if (!String.IsNullOrEmpty(username))
|
||||
{
|
||||
ownerFirstName = account.FirstName;
|
||||
ownerLastName = account.LastName;
|
||||
ownerFirstName = username.Split(' ')[0];
|
||||
ownerLastName = username.Split(' ')[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -170,17 +169,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
}
|
||||
|
||||
public void SendTextBoxToUser(UUID avatarid, string message,
|
||||
int chatChannel, string name, UUID objectid, UUID ownerid)
|
||||
int chatChannel, string name, UUID objectid, UUID ownerID)
|
||||
{
|
||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(
|
||||
m_scene.RegionInfo.ScopeID, ownerid);
|
||||
string username = m_scene.UserManagementModule.GetUserName(ownerID);
|
||||
string ownerFirstName, ownerLastName;
|
||||
UUID ownerID = UUID.Zero;
|
||||
if (account != null)
|
||||
if (!String.IsNullOrEmpty(username))
|
||||
{
|
||||
ownerFirstName = account.FirstName;
|
||||
ownerLastName = account.LastName;
|
||||
ownerID = account.PrincipalID;
|
||||
ownerFirstName = username.Split(' ')[0];
|
||||
ownerLastName = username.Split(' ')[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue