Fixed errors on website loading
Fixed the errors that occurred on initial website load by moving the initial user creation in the DBContext and not in the ASP.NET project
This commit is contained in:
@@ -95,7 +95,7 @@ namespace WebApp.Areas.Identity.Pages.Account
|
||||
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var user = new User { Id = Guid.NewGuid().ToString(), UserName = Input.UserName, Email = Input.Email, FirstName = Input.FirstName, LastName = Input.LastName, PhoneNumber = Input.PhoneNumber, PersonalNumber = Input.EGN, IsAdmin = Input.IsAdmin};
|
||||
var user = new User { Id = Guid.NewGuid().ToString(), UserName = Input.UserName, Email = Input.Email, FirstName = Input.FirstName, LastName = Input.LastName, PhoneNumber = Input.PhoneNumber, PersonalNumber = Input.EGN};
|
||||
var result = await _userManager.CreateAsync(user, Input.Password);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user