If you want to check on the server side, you can try to override the SendEmailConfirmationTokenAsync
method.
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AccountAppService))]
public class MyAccountAppService : AccountAppService
{
protected override async Task SendEmailConfirmationTokenAsync(IdentityUser user,
string applicationName,
string returnUrl,
string returnUrlHash)
{
var isEmailSent = // get from cache or db.
if(isEmailSent){
throw new UserfriendlyException("...")
}else{
var confirmationToken = await UserManager.GenerateEmailConfirmationTokenAsync(user);
await AccountEmailer.SendEmailConfirmationLinkAsync(user, confirmationToken, applicationName, returnUrl, returnUrlHash);
// add confirmationToken to cache or db
}
}
}
Hi,
This is a problem, it seems we haven't updated the download file. I will ask the platform team.
What's your email, I can share it via email for now.
Hi,
Sorry, but I didn't get your email.
Hi,
okay, I will fix the problem in the next version.
Hi,
Yes, but the localized text is independent: https://github.com/abpframework/abp/blob/docspatch/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json#L54-L59
You can override the Register model.
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(RegisterModel))]
public class MyRegisterModel : RegisterModel
{
protected override string GetLocalizeExceptionMessage(Exception exception)
{
var message = base.GetLocalizeExceptionMessage(exception);
if(message.Contains("Passwords must"))
{
message = // change message here
}
return message;
}
}
You can override the AbpApplicationConfigurationController
to change its behavior for your case.
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpApplicationConfigurationController))]
public class MyAbpApplicationConfigurationController : AbpApplicationConfigurationController
{
public MyAbpApplicationConfigurationController(
IAbpApplicationConfigurationAppService applicationConfigurationAppService,
IAbpAntiForgeryManager antiForgeryManager) : base(applicationConfigurationAppService, antiForgeryManager)
{
}
public override async Task<ApplicationConfigurationDto> GetAsync(ApplicationConfigurationRequestOptions options)
{
var applicationConfiguration = await base.GetAsync(options);
applicationConfiguration.Localization.CurrentCulture = xxxx;
return applicationConfiguration;
}
}
Hi,
It should work if you change the current language when you log in.
This is code-logical.
https://github.com/abpframework/abp/blob/rel-7.2/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts#L54
https://github.com/abpframework/abp/blob/rel-7.2/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs#L261
Hi,
Currently, ABP is unable to group by different namespaces. I will consider supporting it in the next version.