meteor-useraccounts / core

Meteor sign up and sign in templates' core functionalities

Home Page:http://useraccounts.meteor.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AccountsTemplates.configure access Meteor.settings = undefined

Gobliins opened this issue · comments

Hi i want to make user registration configurable via meteor config so i did this:

Accounts.js
AccountsTemplates.configure({ forbidClientAccountCreation: Meteor.settings.forbiduserreg, ...

Also on the route config:
['signIn', 'signUp', 'resetPwd', 'forgotPwd', 'enrollAccount'].forEach( .. if(Meteor.settings.forbiduserreg == false){ (routeName) => AccountsTemplates.configureRoute(routeName) }

In my settings file settings.json i have this value:

"forbiduserreg":true

But when i start my server i get this error:
Uncaught TypeError: Cannot read property 'userreg' of undefined

Is this a Problem because Meteor.settings is not accessable during AccountsTemplates.configure ?
How can i fix this issue?

OK i found out i can use the 'Meteor.settings.public' modifier.