mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
more small tweaks around the username/alias
This commit is contained in:
parent
9f7523d7c5
commit
3d2209d163
6 changed files with 23 additions and 7 deletions
|
@ -114,9 +114,13 @@ namespace Ombi.Core
|
|||
}
|
||||
|
||||
// could be a local user
|
||||
var localName = session[SessionKeys.UsernameKey];
|
||||
var hasSessionKey = session[SessionKeys.UsernameKey] != null;
|
||||
if (hasSessionKey)
|
||||
{
|
||||
return (string)session[SessionKeys.UsernameKey];
|
||||
}
|
||||
|
||||
return localName as string;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Ombi.Helpers;
|
||||
using Ombi.Helpers.Permissions;
|
||||
|
||||
|
@ -38,5 +39,8 @@ namespace Ombi.Core.Users
|
|||
public Features Features { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
public UserType Type { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string UsernameOrAlias => string.IsNullOrEmpty(UserAlias) ? Username : UserAlias;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue