Closed Gobliins closed 7 years ago
Hi i want to make user registration configurable via meteor config so i did this:
Accounts.js AccountsTemplates.configure({ forbidClientAccountCreation: Meteor.settings.forbiduserreg, ...
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) }
['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
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.
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?