Improved install user experience
This commit is contained in:
@@ -112,7 +112,7 @@ public class IdentityService
|
||||
if (user == null)
|
||||
{
|
||||
Logger.Warn(
|
||||
$"Cannot find user with the id '{userid}' in the database. Maybe the user has been deleted or a token has been successfully faked by a hacker");
|
||||
$"Cannot find user with the id '{userid}' in the database. Maybe the user has been deleted or a token has been successfully faked by a hacker", "security");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,17 +66,15 @@ public class UserService
|
||||
{
|
||||
throw new DisplayException("The email is already in use");
|
||||
}
|
||||
|
||||
//TODO: Validation
|
||||
|
||||
// Add user
|
||||
var user = UserRepository.Add(new()
|
||||
{
|
||||
Address = "",
|
||||
Admin = false,
|
||||
Admin = !UserRepository.Get().Any(),
|
||||
City = "",
|
||||
Country = "",
|
||||
Email = email,
|
||||
Email = email.ToLower(),
|
||||
Password = BCrypt.Net.BCrypt.HashPassword(password),
|
||||
FirstName = firstname,
|
||||
LastName = lastname,
|
||||
|
||||
Reference in New Issue
Block a user