Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Morgan 1 post 71 karma points
    May 22, 2023 @ 14:05
    Morgan
    0

    Umbraco Sign up form signing users in automatically

    I'm currently looking at implementing a sign up form on a website within Umbraco. When the user signs up, I need it to not sign them in automatically. I am using the code below but for some reason it still signs them in after completing the form, even though I am setting WithAutomaticLogIn to false. Is there something I am doing wrong or is it a problem with Umbraco?

    var registerModel = memberModelBuilderFactory
    .CreateRegisterModel()
    // Set the member type alias to use for the new member
    .WithMemberTypeAlias(Constants.Conventions.MemberTypes.DefaultAlias)
    // If null or not set, this will redirect to the current page
    .WithRedirectUrl(null)
    // Set to true if you want the member editable properties shown.
    // It will only displays properties marked as "Member can edit" on the "Info" tab of the Member Type.
    .WithCustomProperties(true)
    // By default the member will be logged in automatically after registration.
    // Set this to false if the member should not be logged in automatically.
    .WithAutomaticLogIn(false)
    .Build();
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies