summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMax Wu2017-01-12 23:37:28 +0800
committerGitHub2017-01-12 23:37:28 +0800
commit48510984775a8b9caac295448840e56f65f164dd (patch)
treecd6df969c198d4e99293bb18ebf77ab8528633a8 /lib
parent8b378d7847b82f34ceedfdfbf27d5fe324ab1944 (diff)
parent747629e549fb5c32e1acf18e24bfc6a7e1cd5b0c (diff)
Merge pull request #317 from SISheogorath/master+allowEmailRegister
Add `allowemailregister` option
Diffstat (limited to 'lib')
-rw-r--r--lib/config.js2
-rwxr-xr-xlib/response.js1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/config.js b/lib/config.js
index 6b2ba0b6..031c6741 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -132,6 +132,7 @@ if (process.env.HMD_LDAP_PROVIDERNAME) {
}
var imgur = process.env.HMD_IMGUR_CLIENTID || config.imgur || false;
var email = process.env.HMD_EMAIL ? (process.env.HMD_EMAIL === 'true') : !!config.email;
+var allowemailregister = process.env.HMD_ALLOW_EMAIL_REGISTER ? (process.env.HMD_HMD_ALLOW_EMAIL_REGISTER === 'true') : !!config.allowemailregister;
function getserverurl() {
var url = '';
@@ -194,6 +195,7 @@ module.exports = {
ldap: ldap,
imgur: imgur,
email: email,
+ allowemailregister: allowemailregister,
imageUploadType: imageUploadType,
s3: s3,
s3bucket: s3bucket
diff --git a/lib/response.js b/lib/response.js
index 6c1db967..9014a0a0 100755
--- a/lib/response.js
+++ b/lib/response.js
@@ -68,6 +68,7 @@ function showIndex(req, res, next) {
google: config.google,
ldap: config.ldap,
email: config.email,
+ allowemailregister: config.allowemailregister,
signin: req.isAuthenticated(),
infoMessage: req.flash('info'),
errorMessage: req.flash('error')