Skip to content

Commit

Permalink
Fix register user when allow read and write anonymous is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto committed Jun 5, 2019
1 parent bcecda0 commit 50cfd8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/ui-master/client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Template.main.helpers({
hasUsername() {
const uid = Meteor.userId();
const user = uid && Users.findOne({ _id: uid }, { fields: { username: 1 } });
return (user && user.username) || settings.get('Accounts_AllowAnonymousRead');
return (user && user.username) || (!uid && settings.get('Accounts_AllowAnonymousRead'));
},
requirePasswordChange() {
const user = Meteor.user();
Expand Down

0 comments on commit 50cfd8b

Please sign in to comment.