Skip to content

Commit

Permalink
Anonymous user were being created based on manually approve users (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored Aug 21, 2020
1 parent abae419 commit 528fbe7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/authentication/server/startup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Accounts.onCreateUser(function(options, user = {}) {
callbacks.run('beforeCreateUser', options, user);

user.status = 'offline';
user.active = !settings.get('Accounts_ManuallyApproveNewUsers');
user.active = user.active !== undefined ? user.active : !settings.get('Accounts_ManuallyApproveNewUsers');

if (!user.name) {
if (options.profile) {
Expand Down
1 change: 1 addition & 0 deletions server/methods/registerUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Meteor.methods({
globalRoles: [
'anonymous',
],
active: true,
});

const stampedLoginToken = Accounts._generateStampedLoginToken();
Expand Down

0 comments on commit 528fbe7

Please sign in to comment.