Merge remote-tracking branch 'origin/6.2.0' into 7.1.0

Conflicts:
	src/Umbraco.Core/Models/Member.cs
This commit is contained in:
Shannon
2014-03-18 19:40:41 +11:00
2 changed files with 12 additions and 2 deletions

View File

@@ -29,6 +29,16 @@ namespace Umbraco.Core.Models
public Member(IMemberType contentType)
: base("", -1, contentType, new PropertyCollection())
{
Mandate.ParameterNotNull(contentType, "contentType");
_contentTypeAlias = contentType.Alias;
_contentType = contentType;
IsApproved = true;
//this cannot be null but can be empty
_rawPasswordValue = "";
_email = "";
_username = "";
}
/// <summary>
@@ -37,7 +47,7 @@ namespace Umbraco.Core.Models
/// <param name="name">Name of the content</param>
/// <param name="contentType">ContentType for the current Content object</param>
public Member(string name, IMemberType contentType)
: base(name, -1, contentType, new PropertyCollection())
: this(contentType)
{
Mandate.ParameterNotNull(contentType, "contentType");
Mandate.ParameterNotNullOrEmpty(name, "name");

View File

@@ -148,7 +148,7 @@ namespace Umbraco.Web.Editors
throw new HttpResponseException(HttpStatusCode.NotFound);
}
emptyContent = new Member("", contentType);
emptyContent = new Member(contentType);
emptyContent.AdditionalData["NewPassword"] = Membership.GeneratePassword(Membership.MinRequiredPasswordLength, Membership.MinRequiredNonAlphanumericCharacters);
return Mapper.Map<IMember, MemberDisplay>(emptyContent);
case MembershipScenario.CustomProviderWithUmbracoLink: