|
|
@@ -41,7 +41,6 @@ module.exports = function(crowi) {
|
|
|
imageUrlCached: String,
|
|
|
isGravatarEnabled: { type: Boolean, default: false },
|
|
|
isEmailPublished: { type: Boolean, default: true },
|
|
|
- isEmailPublishedForNewUser: { type: Boolean, default: false },
|
|
|
googleId: String,
|
|
|
name: { type: String },
|
|
|
username: { type: String, required: true, unique: true },
|
|
|
@@ -543,7 +542,6 @@ module.exports = function(crowi) {
|
|
|
newUser.setPassword(password);
|
|
|
newUser.createdAt = Date.now();
|
|
|
newUser.status = STATUS_INVITED;
|
|
|
- newUser.isEmailPublishedForNewUser = false;
|
|
|
|
|
|
const globalLang = configManager.getConfig('crowi', 'app:globalLang');
|
|
|
if (globalLang != null) {
|
|
|
@@ -653,6 +651,13 @@ module.exports = function(crowi) {
|
|
|
}
|
|
|
|
|
|
const configManager = crowi.configManager;
|
|
|
+
|
|
|
+ const isEmailPubshedForNewUser = configManager.getConfig('crowi', 'app:isEmailPubshedForNewUser');
|
|
|
+ if (isEmailPubshedForNewUser === false) {
|
|
|
+ newUser.isEmailPublished = false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
const globalLang = configManager.getConfig('crowi', 'app:globalLang');
|
|
|
if (globalLang != null) {
|
|
|
newUser.lang = globalLang;
|