Copied to clipboard

Flag this post as spam?

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


  • Mark Olbert 87 posts 117 karma points
    Oct 21, 2009 @ 01:30
    Mark Olbert
    0

    MembershipUser: Require Question and Answer, Allow Password Retrieval

    I have the membership section of my umbraco site set as follows:

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
          <clear />
          <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="true" enablePasswordReset="false" requiresQuestionAndAnswer="true" defaultMemberTypeAlias="WebsiteUser" />
          <add name="AspNetSqlMemberShipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" />
          <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" />
      </providers>
    </membership>

    Basically, the only changes I made were to the UmbracoMembershipProvider line, and that was to enable password retrieval and require question/answer info.

    However, when I call MembershipUser.CreateUser() with a question and answer, the returned MembershipUser does not have a question property.

    Does the Umbraco provider not support questions and answers? Does it support password retrieval? Password reset?

    - Mark

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Oct 21, 2009 @ 03:39
    Aaron Powell
    0

    I'd been procrastinating about getting this onto the wiki, but it's done now - our.umbraco.org/.../umbracomembershipprovider-properties

  • skiltz 501 posts 701 karma points
    Oct 21, 2009 @ 04:38
    skiltz
    0

    Ohhh....this stuff is good.

    Question:  If I use umbracoApprovedPropertyTypeAlias will this allow members to login if this is false?

    Thanks.

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Oct 21, 2009 @ 04:47
    Aaron Powell
    0

    Yes it should, if it doesn't then log that as a bug.

    It's coded to work the way you'd expect it to.

  • Mark Olbert 87 posts 117 karma points
    Oct 21, 2009 @ 05:45
    Mark Olbert
    0

    Are you sure? From the name (umbracoApprovedPropertyTypeAlias) I'd think that if the underlying Member property was false it wouldn't allow login. But if it were true, it would allow log in.

    - Mark

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Oct 21, 2009 @ 09:05
    Aaron Powell
    0

    yes that is the applied logic in the code

  • Michael Latouche 504 posts 819 karma points MVP 3x c-trib
    Nov 18, 2009 @ 12:56
    Michael Latouche
    0

    Probably a stupid question but just to make sure: does this property map with the "MembershipUser.IsApproved" property? Because it keeps returning true in my case, although it is set to false in the Umbraco Membership admin screen (True/False checkbox unchecked).

    Thanks.

    Michael.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 18, 2009 @ 13:23
    Dirk De Grave
    0

    May have found a bug in there. Been looking at the code for the 4.1 release branch. I've found 

    config["umbracoApprovePropertyTypeAlias"];

    (Missing a 'd' from ApproveD). Can you check whether it works of you're setting membership attribute to umbracoApprovePropertyTypeAlias instead of umbracoApprovedPropertyTypeAlias

     

    If that works, please report issue on Codeplex.

     

    TIA,

    /Dirk

     

     

  • Michael Latouche 504 posts 819 karma points MVP 3x c-trib
    Nov 18, 2009 @ 14:27
    Michael Latouche
    0

    It works indeed with "umbracoApprovePropertyTypeAlias ". Thanks!

    Michael.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 18, 2009 @ 22:33
    Aaron Powell
    0

    Sorry Dirk, that's probably just my bad typing, I've fixed the wiki now

Please Sign in or register to post replies

Write your reply to:

Draft