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

Forums / Developing with Sitefinity / Membership registration - Email address as login username

Membership registration - Email address as login username

4 posts, 1 answered
  1. Alvaro
    Alvaro avatar
    2 posts
    Registered:
    22 Sep 2009
    21 Jan 2010
    Link to this post
    Hiya,

    Using the standard TelerikMembershipProvider, is there a simple way to make the standard registration controls within Sitefinity utilise the user's email address, rather than their chosen username, as their login identification?

    If this isn't possible, is it worth creating a user control that takes the correct email address and password, then uses the MembershipProvider to create the user with the email address as the username?

    I have previously written custom MembershipProviders that change the model around, although obviously this means detaching from the standard Telerik framework which I would rather not do.


    Regards,
    Alvaro
  2. Andree
    Andree avatar
    44 posts
    Registered:
    11 Jan 2010
    21 Jan 2010
    Link to this post
    I apologise, I posted the initial thread from the wrong account, but there appears no way to delete the thread!
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    21 Jan 2010
    Link to this post
    Hello Alvaro,

    You can use standard ASP.NET CreateUzerWizard control. In its ContentTemplate you can set the Username textbox and label as hidden and in the code behind set the e-mail address as username.

    public partial class CreateUserWizardControl : System.Web.UI.UserControl
    {
     
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (!String.IsNullOrEmpty(CreateUserWizard1.UserName))
            {
               // user email as username and vice verca
                CreateUserWizard1.UserName = CreateUserWizard1.Email;
            }
        }
    }


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  4. Andree
    Andree avatar
    44 posts
    Registered:
    11 Jan 2010
    21 Jan 2010
    Link to this post
    Great, many thanks for the simple suggestion!

    Regards,
    Alvaro
Register for webinar
4 posts, 1 answered