public IActionResult Login(AccountViewModel account) { if (!ModelState.IsValid) { if (_pbr.CheckAccount(account.Username, account.Password)) { if (account.Store) { return(View("Store")); } } return(View("User")); } return(View(account)); }
public IActionResult Login(AccountViewModel account) { if (ModelState.IsValid) { var acct = _pbr.CheckAccount(account.Name, account.Password); if (acct != null) { if (account.User) { return(View("User", acct)); } return(View("Store", acct)); } } return(View(account)); }