More in this section

Forums / General Discussions / Frontend: user register, login, change password, recover password?

Frontend: user register, login, change password, recover password?

10 posts, 0 answered
  1. SteveV
    SteveV avatar
    178 posts
    Registered:
    06 Nov 2011
    25 Nov 2011
    Link to this post
    I'm trying to implement frontend user registration/login/logout/change password/recover password functionality.  I created a login page and dragged and dropped a "Login" widget on the page.  By default, the "CreateUserUrl", "PasswordChangeUrl" and "PasswordRecoveryUrl" properties are set to display backend pages.  I assume that I need to creat frontend pages with Register, Change Password, and Recover Password functionality?  But the "Login" widgets toolbox doesn't appear to include widgets that support this.  What's the best way to do this?

    Thanks--Steve
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    28 Nov 2011
    Link to this post
    Hello Steve,

    You can change the url of those pages to whatever you like, however you will need to construct the logic of such widget because we do not provide such custom functionality out of the box, except for the built in password recovery page ( as well as the others ).

    The following article may be useful to you, as it provides sample forgot password widget functionality:

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/implement-forgot-password-functionalilty-in-sitefinity-application.aspx


    Kind regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. SteveV
    SteveV avatar
    178 posts
    Registered:
    06 Nov 2011
    29 Nov 2011
    Link to this post
    Hi Victor,

    Thanks for the reply.  I've had a look at the post you referenced and maybe I'm being dense but I'm still confused.  I assume I need to create custom controls for Registration, Password Recovery, etc.  Is that correct?

    Assuming this was the case I created a custom control named "PasswordRecoveryWidget" with the following code:
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PasswordRecoveryWidget.ascx.cs" Inherits="SitefinityWebApp.CustomControls.PasswordRecoveryWidget" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Security.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
     
    <sf:PasswordRecoveryForm runat="server" AllowSelectMembershipProvider="true" ID="PWRecoveryForm" MailDefinition-From="webmaster@mydomain.org" MailDefinition-IsBodyHtml="True" MailDefinition-Subject="Password Recovery">
    </sf:PasswordRecoveryForm>

    I added the control to "Settings>Advanced>Toolboxes>Toolboxes>PageControls>Sections>Login".  I created a new page named "Password Recovery" and dragged and dropped my new PasswordRecoveryWidget.  Next, I published the page and borwsed to it.  The page displays without error but there is no PasswordRecoveryForm on the page.  Clearly I'm doing something wrong here.  Looking at the custom control in design view, I see an "Error Rendering Control" (see the attached image).

    Regarding the User Registration control; I assume I use UserManager.CreateUser?

    Also, the post you referenced indicates that in order for password recovery to work the "the password format should be set to different than Hashed" . Is it safe to assume that setting this value to "Encrypted" will work and *will not* break login for existing users that were created when the value of this setting was "Hashed".

    Lastly, I'm really surprized that these controls don't exist out of the box.  User account management is so common that it seems silly to have to create custom controls for functionality that's implemented in just about every website with user login capability.

    --Steve
  4. SteveV
    SteveV avatar
    178 posts
    Registered:
    06 Nov 2011
    30 Nov 2011
    Link to this post
    Ok, I answered a few of my own questions:

    The problem with the password recovery custom control turned out to be a problem with the way I created the control.  That's fixed and now works. 

    Regarding passwordFormat changes; changing the password format doesn't break login for existing users but it doesn't fix the "Cannot retrieve Hashed passwords." problem for users that were created when the passwordFormat parameter was set to "Hashed".  Not a problem in my case since the site hasn't been rolled out but this could be a pretty big problem if you've got hundreds or thousands of users and decide to later make the change.  This potential pitfall should probably be included in the docs somewhere.

    --Steve
  5. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    30 Nov 2011
    Link to this post
    Hello Steve,

    Glad to hear that you were able to resolve the issue. I want to note that the widgets ( regarding the user registration and activation )  are still in development so you can expect news on that front at some point in the future.

    Kind regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. SteveV
    SteveV avatar
    178 posts
    Registered:
    06 Nov 2011
    30 Nov 2011
    Link to this post
    Hi Victor,

    Good to hear you guys are going to be adding this.  Is there an ETA for availability of the new widgets?

    Thanks--Steve
  7. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    02 Dec 2011
    Link to this post
    Hi Steve,

    Unfortunately we do not have an exact date when the widgets will exit their beta stage, but it will be after Sitefinity 4.4.

    Greetings,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    12 Dec 2011
    Link to this post
    Hi Olivia,


    All the best,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Lewis
    Lewis avatar
    4 posts
    Registered:
    30 Apr 2011
    18 Dec 2011
    Link to this post
    Hi Victor,

    The link in your reply: http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/frontend-user-register-login-change-password-recover-password.aspx is broken; I am getting a server error so am unable to see the page.
  10. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    20 Dec 2011
    Link to this post
    Hi Lewis,

    I am sorry for the broken link. Here is the correct one.

    Kind regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
10 posts, 0 answered