Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created February 5, 2018 19:53
SF_10.1, SF_10.2, SF_11.0, SF_11.1, SF_11.2, SF_12.0, SF_12.1, SF_12.2, SF_13.0, SF_13.1, SF_13.2, SF_13.3, SF_14.0, SF_14.1, SF_14.2, SF_14.3 - https://docs.sitefinity.com/administration-set-password-requirements
using System;
using System.Configuration;
using Telerik.Sitefinity.Security;
using Telerik.Sitefinity.Utilities.TypeConverters;
namespace SitefinityWebApp
{
public class ChangePassword
{
public void RecoverPasswordCustomMembershiProvider(string MembershipProviderName)
{
UserManager userManager = UserManager.GetManager();
var recoveryMailAddress = userManager.RecoveryMailAddress;
Type MembershipProvider = TypeResolutionService.ResolveType(MembershipProviderName);
if (String.IsNullOrEmpty(recoveryMailAddress))
{
recoveryMailAddress = ConfigurationManager.AppSettings[MembershipProvider + "_RecoveryMailAddress"];
if (String.IsNullOrEmpty(recoveryMailAddress))
recoveryMailAddress = string.Empty;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment