I'm having trouble getting the right result from my stored procedure, I'm not going to post the code because I've messed around with it too much and I can't remember what I started with. What I'm trying to do is this:
If entered username and password match a record in db
if EmailConfirmed = true
user = 1 (activated)
else
user = -2 (not activated)
else
user = -1 (user invalid)
end
The table is called AspNetUsers, fields are as follows:
Id
UserName
PasswordHash
EmailAddress
EmailConfirmed
No matter how I amend the code it gives unexpected results. Please could you help with the code?