fixing temp password issue
This commit is contained in:
parent
69b9e69f00
commit
a30bb60690
2 changed files with 8 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Identity;
|
|||
using Microsoft.AspNetCore.WebUtilities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using OfficeOpenXml;
|
||||
using PasswordGenerator;
|
||||
using SeaHavenIndustries.Data.IRepository;
|
||||
using SeaHavenIndustries.Helper;
|
||||
using SeaHavenIndustries.Helper.ViewModels;
|
||||
|
|
@ -128,7 +129,12 @@ namespace SeaHavenIndustries.Data.Services
|
|||
model.UserName = model.Email;
|
||||
model.CreatedDate = DateTime.Now;
|
||||
model.UniqueName = "Active";
|
||||
var password = GenerateRandomPassword(8);
|
||||
|
||||
var pwd = new Password(8).IncludeLowercase().IncludeUppercase().IncludeSpecial().IncludeNumeric();
|
||||
var password = pwd.Next();
|
||||
|
||||
|
||||
//var password = GenerateRandomPassword(8);
|
||||
var result = await _userManager.CreateAsync(model, password);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4" />
|
||||
<PackageReference Include="PasswordGenerator" Version="2.1.0" />
|
||||
<PackageReference Include="PuppeteerSharp" Version="19.0.1" />
|
||||
<PackageReference Include="Radzen.Blazor" Version="5.1.3" />
|
||||
<PackageReference Include="SendGrid" Version="9.29.3" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue