Activities of "liangshiwei"

Hi,

We have created an internal issue for this. it will fix soon.

Hi,

We have fixed this problem: https://github.com/abpframework/abp/pull/6649

For now, you can try to clear the brower cookies.

Hi,

We have enabled swagger login for HostWithIds project: https://github.com/abpframework/abp/pull/6818

Hi,

It has nothing todo with ABP and it works out of the box.

Hi,

I have updated code, please try again. PS: The sample code just provides an idea, you should improve it as needed

Can I check it remotely? shiwei.liang@volosoft.com

Hi,

NullEmailSender is expected, you can see the email body in application log.

If you want to send email to the inbox, you need to configure the mail server: https://docs.abp.io/en/abp/latest/MailKit.

SMS also: https://docs.abp.io/en/commercial/latest/modules/twilio-sms

Can I check it remotely? shiwei.liang@volosoft.com

Hi,

I think you can use page filter, like:

public class UserInfoCheckPageFilter : IAsyncPageFilter, ITransientDependency
{
    private readonly ICurrentUser _currentUser;
    private readonly IdentityUserManager _identityUserManager;
    private static readonly List<string> IgnoreUrls = new() {"/account/userinfo"};

    public UserInfoCheckPageFilter(ICurrentUser currentUser, IdentityUserManager identityUserManager)
    {
        _currentUser = currentUser;
        _identityUserManager = identityUserManager;
    }

    public Task OnPageHandlerSelectionAsync(PageHandlerSelectedContext context)
    {
        return Task.CompletedTask;
    }

    public async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next)
    {
        if (!_currentUser.Id.HasValue || IgnoreUrls.Any(url => context.HttpContext.Request.Path.ToString().ToLower().Contains(url)) )
        {
            await next.Invoke();
            return;
        }

        var user = await _identityUserManager.GetByIdAsync(_currentUser.GetId());

        //check user information...
        if (user.PhoneNumber.IsNullOrWhiteSpace())
        {
            context.Result = new RedirectResult("/account/userinfo");

            return;
        }

        await next.Invoke();
    }
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
    Configure<MvcOptions>(options =>
    {
        options.Filters.Add(typeof(UserInfoCheckPageFilter));
    });
}

Hi,

I can't reproduce your problem, can you provide more steps? thanks.

Showing 5311 to 5320 of 5933 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11