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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user