Skip to content

Commit

Permalink
Merge pull request #7030 from pmb0/ldap-fallback-pw-store
Browse files Browse the repository at this point in the history
[FIX] do only store password if LDAP_Login_Fallback is on
  • Loading branch information
rodrigok authored May 31, 2017
2 parents a3e88a1 + 8a23424 commit b20cff2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/rocketchat-ldap/server/loginHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ Accounts.registerLoginHandler('ldap', function(loginRequest) {
});

syncUserData(user, ldapUser);
Accounts.setPassword(user._id, loginRequest.ldapPass, {logout: false});

if (RocketChat.settings.get('LDAP_Login_Fallback') === true) {
Accounts.setPassword(user._id, loginRequest.ldapPass, {logout: false});
}

return {
userId: user._id,
token: stampedToken.token
Expand Down

0 comments on commit b20cff2

Please sign in to comment.