Copied to clipboard

Flag this post as spam?

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


  • Jacqui Kipfer 20 posts 102 karma points
    Oct 16, 2014 @ 19:19
    Jacqui Kipfer
    0

    Membership Is Approved checkbox not checked in MemberType property

    Hi,

    I have recently upgraded my Umbraco CMS website to umbraco 7.1.8.  On my site I am using both the CMS and as well I have created a frontend website where members can register and log into my frontend site.  I am using the umbraco Membership provider and I have extended it with a class so I can capture my own profile details, specific to my member type. All good so far.    The front end website is written in webforms (please don't judge me!!) I have a registration page where the member can enter username/password to sign up, then they get an email with a link that will launch my Auth page.  The Auth page sets the umbracoMemberApproved property = true so that the user can sign in.

    This all works wonderfully except one little detail. After a member has authenticated themself, the Is Approved check box on Member in the Umbraco backoffice does not get checked. However the member can successfully login.  If I debug the Auth page, I can see that the thisUser.IsApproved IS getting set to true and my member can log in, but the Is Approved check box does not appear as checked. 

    If I check (and save) then uncheck (and save) the Is Approved checkbox for my member, they definitely can't login.  If I check Is Approved once more, they can login, so I think I am setting the correct value.

    Furthermore, if I manually check Is Approved in the backoffice and then try to Authorize my user again while debugging the Auth page, I can see that thisUser.IsApproved = true (as I would expect) when I first enter the page, the setting of the thisUser.IsApproved = true step is skipped (as expected) and my member gets a message saying that their email address has already been confirmed.

    My web.config looks like this

       

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear/>

    <add name="UmbracoMembershipProvider" type="Umbraco.Web.Security.Providers.MembersMembershipProvider, Umbraco" minRequiredNonalphanumericCharacters="1" minRequiredPasswordLength="6" useLegacyEncoding="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="KudosMember" umbracoApprovePropertyTypeAlias="umbracoMemberApproved" umbracoLockPropertyTypeAlias="umbracoMemberLockedOut" passwordFormat="Hashed"/>

     

    I get my member object like this

     Dim thisUser As MembershipUser = Membership.GetUser(uname)

    and get/set the thisUser.IsApproved property like this:

     

    thisUser.IsApproved = True

    Is anyone else seeing this behaviour for the umbracoMemeberApproved property on a custom MemberType, Member record in the backoffice?  Am I not get/setting the thisUser.IsApproved property correctly?

    Thanks in advance, Jacqui

     

     


     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • Heather Floyd 604 posts 1002 karma points MVP 5x c-trib
    Apr 26, 2015 @ 23:39
    Heather Floyd
    0

    Jacqui, I have noticed a similar issue when setting the value via code.

    Did you try this:

    thisUser.IsApproved = true;
    Membership.UpdateUser(thisUser);
    

    That will make sure the data is saved to the DB.

    ~Heather

  • Liam Dilley 153 posts 379 karma points
    22 days ago
    Liam Dilley
    0

    This is old but in Umbraco 13 I am seeing this issue as well.

    umbracoMember.IsApproved = true; _memberService.Save(umbracoMember);

    But it is'nt when you view the member in the back office.

Please Sign in or register to post replies

Write your reply to:

Draft