Fixes how member is approved is set by defaut and adds unit test for it. Also ensures that it returns true if the property value is invalid for whatever odd reason.

This commit is contained in:
Shannon
2014-02-25 02:10:25 +11:00
parent cb09795280
commit 22b15a06f6
3 changed files with 24 additions and 5 deletions

View File

@@ -228,9 +228,8 @@ namespace umbraco.cms.businesslogic.member
var model = ApplicationContext.Current.Services.MemberService.CreateMemberWithIdentity(
loginName, Email.ToLower(), "", mbt.MemberTypeItem);
model.Name = Name;
model.IsApproved = true;
//The content object will only have the 'WasCancelled' flag set to 'True' if the 'Creating' event has been cancelled, so we return null.
//The content object will only have the 'WasCancelled' flag set to 'True' if the 'Saving' event has been cancelled, so we return null.
if (((Entity)model).WasCancelled)
return null;