custom forgotten password page

Posted by Community Admin on 03-Aug-2018 10:40

custom forgotten password page

All Replies

Posted by Community Admin on 19-Jul-2011 00:00

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

Posted by Community Admin on 19-Jul-2011 00:00

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

Posted by Community Admin on 21-Jul-2011 00:00

Thanks for the reply. Now working.

James

Posted by Community Admin on 16-Aug-2011 00:00

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.

Posted by Community Admin on 18-Aug-2011 00:00

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

Posted by Community Admin on 25-Aug-2011 00:00

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!

Posted by Community Admin on 26-Aug-2011 00:00

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.

This thread is closed