Skip to content

Commit

Permalink
Value cannot be null or whitespace - Parameter name: dbPassword Shazw…
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Sinclair committed May 21, 2020
1 parent f391421 commit 6a31173
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ public async Task<ActionResult> HandleLogin([Bind(Prefix = "loginModel")] LoginM
var user = await _userManager.FindAsync(model.Username, model.Password);
if (user != null)
{

if (user.PasswordHash == null)
{
ModelState.AddModelError("loginModel", "Social Account registered but no website password");
return CurrentUmbracoPage();
}

await SignInAsync(user, true);
return RedirectToCurrentUmbracoPage();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public class IdentityEnabledMembersMembershipProvider : MembersMembershipProvide

public new bool VerifyPassword(string password, string hashedPassword)
{
if (hashedPassword == null)
return true;

return CheckPassword(password, hashedPassword);
}

Expand Down

0 comments on commit 6a31173

Please sign in to comment.