Fixes: U4-4653 MembershipHelper RegisterMember does not set password and ignores logMemberIn, adds a new flag to the model as to whether or not to have the cookie set as a persistent cookie (default is true)

This commit is contained in:
Shannon
2014-04-22 19:03:43 +10:00
parent 30901446e1
commit a92c232178
4 changed files with 9 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ namespace Umbraco.Web.Models
UsernameIsEmail = true;
MemberProperties = new List<UmbracoProperty>();
LoginOnSuccess = true;
CreatePersistentLoginCookie = true;
if (doLookup && HttpContext.Current != null && ApplicationContext.Current != null)
{
var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current));
@@ -93,6 +93,11 @@ namespace Umbraco.Web.Models
/// </summary>
public bool LoginOnSuccess { get; set; }
/// <summary>
/// Default is true to create a persistent cookie if LoginOnSuccess is true
/// </summary>
public bool CreatePersistentLoginCookie { get; set; }
/// <summary>
/// A custom model binder for MVC because the default ctor performs a lookup!
/// </summary>