removing required for last.fm username, fixed handling of empty usernames
This commit is contained in:
parent
3b860fc971
commit
ecf79f146a
@ -33,7 +33,6 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage
|
||||
|
||||
public class InputModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Username")]
|
||||
public string Username { get; set; }
|
||||
}
|
||||
@ -76,7 +75,7 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage
|
||||
|
||||
if (Input.Username != user.LastFmUsername)
|
||||
{
|
||||
user.LastFmUsername = Input.Username.Trim();
|
||||
user.LastFmUsername = Input.Username?.Trim();
|
||||
await _userManager.UpdateAsync(user);
|
||||
|
||||
StatusMessage = "Username changed";
|
||||
|
Loading…
Reference in New Issue
Block a user