Approve member when created with built-in macros (#10428)
* Allow members created with built-in macros to be approved * Cleanup * Newly created members are always approved like in v8. Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
committed by
GitHub
parent
c63b14a52e
commit
0c3db013d5
@@ -34,7 +34,7 @@ namespace Umbraco.Cms.Core.Security
|
||||
/// <summary>
|
||||
/// Used to construct a new instance without an identity
|
||||
/// </summary>
|
||||
public static MemberIdentityUser CreateNew(string username, string email, string memberTypeAlias, string name = null)
|
||||
public static MemberIdentityUser CreateNew(string username, string email, string memberTypeAlias, bool isApproved, string name = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(username))
|
||||
{
|
||||
@@ -46,6 +46,7 @@ namespace Umbraco.Cms.Core.Security
|
||||
user.UserName = username;
|
||||
user.Email = email;
|
||||
user.MemberTypeAlias = memberTypeAlias;
|
||||
user.IsApproved = isApproved;
|
||||
user.Id = null;
|
||||
user.HasIdentity = false;
|
||||
user.Name = name;
|
||||
|
||||
Reference in New Issue
Block a user