* Added Logger and Exception manager
* Added autocreate database if not exists
This commit is contained in:
@@ -42,7 +42,7 @@ namespace Step.Database.Controllers
|
||||
public UserModel Find(int id)
|
||||
{
|
||||
// Find user by Id with Role object included
|
||||
return dbCtx.Users.Include("Role").Where(u => u.UserId == id).First();
|
||||
return dbCtx.Users.Include("Role").Where(u => u.UserId == id).FirstOrDefault();
|
||||
}
|
||||
|
||||
public UserModel Find(string username)
|
||||
@@ -59,7 +59,7 @@ namespace Step.Database.Controllers
|
||||
if (user != null)
|
||||
{
|
||||
// Check if the passwords match
|
||||
if (Crypto.VerifyHashedPassword(user.Password, password) != true)
|
||||
if (Crypto.VerifyHashedPassword(user.GetPassword(), password) != true)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user