1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Registration: Avoiding Secret Question Request

Custom Registration: Avoiding Secret Question Request

4 posts, 0 answered
  1. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    05 May 2009
    Link to this post
    I am creating my own custom registration because we have other questions we need to ask over the ones that are in the base registration control and our designer wants it to look a certain way. I created it with the following code:

    // Create SiteFinity UserManager class to create user in SiteFinity.
                UserManager userMgr = new UserManager();
                MembershipCreateStatus userCreateStatus = new MembershipCreateStatus();
                MembershipUser createdMembershipUser = userMgr.CreateUser(txtEmail.Text, txtPassword.Text, txtEmail.Text,"","", true, out userCreateStatus);

    The problem is that when I call this it wants me to specify a secret question and answer. Can I avoid this by setting something in web.config? I dont want a secret question and answer system.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 May 2009
    Link to this post
    Hello Armysniper,

    There are about 4 ways to create a user using MembershipUser, CreateUser method. If you want to use MembershipCreateUser enumerator you should add all parameters to the method. Generally you can configure the provider to not require the user  to answer a password question for password reset and retrieval.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    05 May 2009
    Link to this post
    I am using the SiteFinity membership provider. I just decided to create my own registration so I can add additional questions to the registration page and then have those answers stored in the same database with SiteFinity in a separate table linked to the user table of SiteFinity. My question is, how can I configure the provider to NOT ask secret question and answer.
  4. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    06 May 2009
    Link to this post
    I solved it. I just changed to use the CreateUser method that does not ask the question at all. I just handle the exception now instead of the outparam.
Register for webinar
4 posts, 0 answered