Where is the SF public password recovery control?????????

Posted by Community Admin on 04-Aug-2018 09:29

Where is the SF public password recovery control?????????

All Replies

Posted by Community Admin on 13-Feb-2012 00:00

Where can I get the SF passwordrecovery control? I am wanting to add it to a public site page.
The old asp.net controls no longer work and I was able to change my custom login view control to reference public SF controls.

My question is where is the SF PasswordRecovery control? I don't want to send our users off to the \sitefinity\login\passwordrecovery page. There is a widget template at C:\Program Files\Telerik\Sitefinity 4.4\SDK\Content\Resources\WidgetTemplates\Backend\Security\PasswordRecoveryUserNameTemplate.ascx, but it doesn't have a reference at the top to its namespace to function. Am I looking at the wrong thing?

Custom user control with SF public login controls..

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginViewControl.ascx.cs" Inherits="UserControls_2010_LoginViewControl" %>
 
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls" TagPrefix="sf" %>
 
<%@ Register src="LoginControl.ascx" tagname="LoginControl" tagprefix="uc1" %>
 
<div runat="server">   
    <asp:LoginView ID="LoginView1" runat="server">
        <LoggedInTemplate>
        <div class="logged-in">
            <h2>Membership Login</h2>
            <p>
                <span style="color:#9C9C87;"><asp:Literal ID="UserLabel" runat="server" Text="Logged in as: "></asp:Literal></span>
                <strong><sf:LoginNameControl ID="loginName" runat="server" /></strong>
                <nobr>( <sf:LoginStatusControl ID="loginStatus" runat="server" /> )</nobr><br />
                <asp:HyperLink ID="hlReset" runat="server" NavigateUrl="~/Users/ChangePassword.aspx">Change your password</asp:HyperLink><br /> 
            </p>
        </div>
        <div id="update-details">
            <div class="inner">
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Membersanddelegates/UpdateYourDetails.aspx">Update your Details here</asp:HyperLink>
            </div>
        </div>
        </LoggedInTemplate>
        <AnonymousTemplate>
            <div id="login">
                <h2>Membership Login</h2>
                <sf:LoginControl ID="login1" runat="server" RememberMeText="Remember me next time" PasswordRecoveryText="Forgot your details?" ShowForgotPasswordLink="true" VisibleWhenLoggedIn="false" ShowChangePasswordLink="false" ShowHelpLink="false" HelpPageText="" RenderOuterTable="false" LoginButtonStyle-CssClass="login-btn" LoginButtonText="Login" LoginButtonType="Link" PasswordRecoveryUrl="~/Users/ResetPassword.aspx" />
            </div>    
        </AnonymousTemplate>
    </asp:LoginView>
</div>

Posted by Community Admin on 13-Feb-2012 00:00

It would be good if you could still use the ASP.NET PasswordRecovery control, but that is all out the window, which is a shame.. I might need to log a support call cause this is needed asap..

Posted by Community Admin on 14-Feb-2012 00:00

I've always found the lack of these very basic controls in SF to be very odd. I ended up creating a simple user control for password recovery. Here's the code:

View (embeded .ascx resource)

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="sf" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Security.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<asp:Panel ID="PasswordRecoverWrapper" runat="server" CssClass="nlgPasswordRecoveryWrp">
    <h2>
        Recover Your Password</h2>
    <asp:Panel ID="Panel1" runat="server" CssClass="nlgPasswordRecoveryContainer">
        <sf:PasswordRecoveryForm runat="server" AllowSelectMembershipProvider="true" ID="PWRecoveryForm" MailDefinition-From="webmaster@yourdomain.com" MailDefinition-IsBodyHtml="True" MailDefinition-Subject="Password Recovery">
            <MailDefinition From="webmaster@yourdomain.com" IsBodyHtml="True" Subject="yourdomain.com Password Recovery">
            </MailDefinition>
        </sf:PasswordRecoveryForm>
    </asp:Panel>
</asp:Panel>


Code behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Sitefinity.Web.UI;
using Telerik.Sitefinity.Security;
using Telerik.Sitefinity.Security.Model;
using System.Web.UI.WebControls;
 
namespace SitefinityWebApp.CustomControls
    public class PasswordRecoveryWidget : SimpleView
    
        #region Properties
 
        protected override string LayoutTemplateName
        
            get
            
                return "SitefinityWebApp.CustomControls.Resources.Views.PasswordRecovery.ascx";
            
        
                #endregion
 
        protected override void InitializeControls(GenericContainer container)
        
            EnsureChildControls();
        
    

You'll need to do some styling but this should get you started.

Hope this helps,

Steve

Posted by Community Admin on 14-Feb-2012 00:00


Hi,

The out of the box Login widget that can be dropped onto a Sitefinity page provides the ForgotPassword functionality, however if you need to use it as a separate widget, I believe you might find the discussion we've had on this forum thread useful.
For your convenience I'm attaching a sample user control and a short video demonstrating how it works. Please do not hesitate to get back to us if you need any further assistance on this functionality, we'll be glad to help

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 12-Jun-2012 00:00

so.. what is the best way to change the URL for the Cancel link in the Password Recovery control so it goes back to the "public" login page and not the Sitefinity login page??

Thanks you.

Posted by Community Admin on 15-Jun-2012 00:00

Hi,

You can specify the CancelDestinationPageUrl in the control declaration.

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

This thread is closed