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

Forums / General Discussions / custom forgotten password page

custom forgotten password page

7 posts, 1 answered
  1. James
    James avatar
    2 posts
    Registered:
    19 Jul 2011
    19 Jul 2011
    Link to this post
    Currently on the site I am working on, I have one page which users need to login to see. So have set up a login page and user group for users with the permission to see this page. I am having trouble with the forgotten password link though. I would like to have the link take the user to a custom forgotten password page rather than to the sitefinity one. Has any one done this or have an example that I could use to help?

    Thanks

    James
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    19 Jul 2011
    Link to this post
    Hi James,

    In case we're talking about the public LoginControl that can be dropped on any frontend page, this is easily achieved. You can specify the link to a custom ForgotPassword by editing the LoginControl settings - there's a property PasswordRecoveryUrl which you can simply set to the location of your cistom page. If you want to mimic the looks of the default one, please find below the markup of our PasswordRecovery page.
    <%@ Page Language="C#" AutoEventWireup="true" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Security.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <title>Sitefinity 4.1 - Password Recovery</title>
    </head>
    <body class="sfLogin">
        <form id="aspnetForm" runat="server">
            <sf:ResourceLinks id="resourceLinks" runat="server">
                <sf:ResourceFile Name="CSS/Reset.css" />
                <sf:ResourceFile Name="CSS/Layout.css" />
                <sf:ResourceFile Name="CSS/Colors.css" />
                <sf:ResourceFile Name="Styles/Login.css" />
            </sf:ResourceLinks>
            <div class="sfWrapper">
                <fieldset class="sfLoginForm">
                <h1 class="sfLogo">Sitefinity</h1>
                      <div class="sfForm">
                        <div class="sfFormIn">                
                            <div class="sfLoginShadowTopRight"></div>
                            <div class="sfLoginShadowBottomLeft"></div>
                            <h2>
                                <%$ Resources:ErrorMessages, PasswordRecoveryDefaultUserNameTitleText %>
                                <%--<asp:Literal ID="ProjectName" runat="server" Text="" />--%>
                            </h2>
                                     
                            <sf:PasswordRecoveryForm runat="server" AllowSelectMembershipProvider="true">
                                <MailDefinition From="passwordRecovery@noreply.com"
                                  Subject="Password Recovery" IsBodyHtml="true" />
                            </sf:PasswordRecoveryForm>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="sfFooter">
                <p class="sfCopy"><strong>Sitefinity 4.1</strong> | Telerik Inc. All rights reserved</p>
                <ul class="sfSupportLinks">
                    <li class="sfFirst"><a href="http://www.sitefinity.com/help/developer-manual/introduction.html">Documentation</a></li>
                    <li><a href="http://www.sitefinity.com/support/forums.aspx">Forum</a></li>
                    <li><a href="http://blogs.sitefinity.com/">Blog</a></li>
                </ul>
            </div>
        </form>
    </body>
    </html>


    All the best,
    Boyan Barnev
    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
    Answered
  3. James
    James avatar
    2 posts
    Registered:
    19 Jul 2011
    21 Jul 2011
    Link to this post
    Thanks for the reply. Now working.

    James
  4. Seattle Web Group
    Seattle Web Group avatar
    29 posts
    Registered:
    03 May 2011
    16 Aug 2011
    Link to this post
    This is helpful.  Where can we get the default template used by <sf:PasswordRecoveryForm /> so that it's contents can be adjusted?  We need to change the Username label to say Email since we're requiring all users to have their email address as their login name.

    Nevermind, I found it.  The ~/SFRes in the virtual paths were causing some confusion as to where the default templates were located.
  5. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    18 Aug 2011
    Link to this post
    Hi Seattle Web Group,

    I'm glad to hear that the problem has been successfully resolved. If you need any further information, please do not hesitate to let us know.

    Regards,
    Boyan Barnev
    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. FlR
    FlR avatar
    49 posts
    Registered:
    05 Oct 2010
    25 Aug 2011
    Link to this post
    Hi Seattle...I don't find the forgot password template and change password.

    Can you please make a copy paste in this ticket.

    I really appreciate it.

    Thank you!
  7. Seattle Web Group
    Seattle Web Group avatar
    29 posts
    Registered:
    03 May 2011
    26 Aug 2011
    Link to this post
    Hi FIR,

    The template is stored as a resource in the ~/bin/Telerik.Sitefinity.Resources.dll file.  The name of the resource is available in the widget properties when editing an instance of the widget through the Sitefinity administration.
7 posts, 1 answered