summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/users.js b/models/users.js
index 2e879d94..630f4703 100644
--- a/models/users.js
+++ b/models/users.js
@@ -520,10 +520,10 @@ if (Meteor.isServer) {
}
const disableRegistration = Settings.findOne().disableRegistration;
- if (!disableRegistration) {
- if (options.ldap) {
- user.authenticationMethod = 'ldap';
- }
+ // If ldap, bypass the inviation code if the self registration isn't allowed.
+ // TODO : pay attention if ldap field in the user model change to another content ex : ldap field to connection_type
+ if (options.ldap || !disableRegistration) {
+ user.authenticationMethod = 'ldap';
return user;
}