- ABP Framework version: v5.0.0
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
hello there ..
I choosed only "Require Digit"
when I add user and set password only digit from new uesr as like figure below :
it works well ..
but when I add user and set password only digit from here :
it not work and give me three errors :
- non-alphanumeric character
- Required lower case character
- Required upper case character
can I have solution for this problem
thank ...
12 Answer(s)
-
0
Hi,
I will check it.
-
0
Hi,
I will check it.
Ok .. I am waiting you
-
0
Hi,
We had this problem on 5.3.0, it was fixed in 5.3.1, can you upgrade to 5.3.1 and try again?
-
0
Hi,
We had this problem on 5.3.0, it was fixed in 5.3.1, can you upgrade to 5.3.1 and try again?
Sorry Now I use V5.0.0 Not V5.3.0 ... Can you give me principled solution for now because I use Multi Module for bussinses .and I must to upgrade all of them
-
0
Sorry, my bad, I thought you were using version 5.3.0, let me check it.
-
0
Sorry, my bad, I thought you were using version 5.3.0, let me check it.
I am sorry my bad ..not your bad ... I was writing V 5.3.0
-
0
-
0
-
0
Hi,
I wrote above steps for my problem ..
https://support.abp.io/QA/Questions/3345#answer-163eaa79-9777-cdc7-722c-3a04c5a23f8d
Or, can you use the suite to create a new project to reproduce the problem and share it with me? shiwei.liang@volosoft.com
-
0
I will repeat reproduce my problem
I want to create user and take Id and use it in my entity Employee as below :
public virtual async Task<EmployeeDto> CreateAsync(EmployeeCreateDto input) { var email = input.Email ?? $"{input.IdentityNo}@gmail.com"; var user = new IdentityUser(Guid.NewGuid(), input.IdentityNo, email, CurrentTenant.Id); user.Surname = input.Name; var result = await _userManager.CreateAsync(user, "123456"); if (!result.Succeeded) { throw new UserFriendlyException(@L["Validation:ErrorInServer"]); } var employee = ObjectMapper.Map<EmployeeCreateDto, Employee>(input); employee.TenantId = CurrentTenant.Id; employee.AppUserId = user.Id; employee.BirthDate = input.BirthDate.ToDate().Value; employee.IdentityDate=input.IdentityDate.ToDate().Value; employee = await _employeeRepository.InsertAsync(employee, autoSave: true); return ObjectMapper.Map<Employee, EmployeeDto>(employee); }
I set password digit only and set in password setting "Required Digit Only " as below :
it does not work and give me error as below :
I hope to be reproduce my problem well .. thanks
-
0
Hi,
Can you try this:
protected IOptions<IdentityOptions> IdentityOptions { get; } public xxx(IOptions<IdentityOptions> identityOptions) { IdentityOptions = identityOptions; } public virtual async Task CreateAsync(EmployeeCreateDto input) { await IdentityOptions.SetAsync(); // this line var email = input.Email ?? $"{input.IdentityNo}@gmail.com"; var user = new IdentityUser(Guid.NewGuid(), input.IdentityNo, email, CurrentTenant.Id); user.Surname = input.Name; var result = await _userManager.CreateAsync(user, "123456"); if (!result.Succeeded) { throw new UserFriendlyException(@L["Validation:ErrorInServer"]); } var employee = ObjectMapper.Map(input); employee.TenantId = CurrentTenant.Id; employee.AppUserId = user.Id; employee.BirthDate = input.BirthDate.ToDate().Value; employee.IdentityDate=input.IdentityDate.ToDate().Value; employee = await _employeeRepository.InsertAsync(employee, autoSave: true); return ObjectMapper.Map(employee); }
-
0
Hi,
Can you try this:
protected IOptions<IdentityOptions> IdentityOptions { get; } public xxx(IOptions<IdentityOptions> identityOptions) { IdentityOptions = identityOptions; } public virtual async Task CreateAsync(EmployeeCreateDto input) { await IdentityOptions.SetAsync(); // this line var email = input.Email ?? $"{input.IdentityNo}@gmail.com"; var user = new IdentityUser(Guid.NewGuid(), input.IdentityNo, email, CurrentTenant.Id); user.Surname = input.Name; var result = await _userManager.CreateAsync(user, "123456"); if (!result.Succeeded) { throw new UserFriendlyException(@L["Validation:ErrorInServer"]); } var employee = ObjectMapper.Map(input); employee.TenantId = CurrentTenant.Id; employee.AppUserId = user.Id; employee.BirthDate = input.BirthDate.ToDate().Value; employee.IdentityDate=input.IdentityDate.ToDate().Value; employee = await _employeeRepository.InsertAsync(employee, autoSave: true); return ObjectMapper.Map(employee); }
thank a lot it works well ...