Software /
code /
prosody-modules
Diff
mod_auth_ldap/mod_auth_ldap.lua @ 1221:3e5f8e844325
mod_auth_ldap: Fix set_password
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 04 Nov 2013 18:13:57 +0100 |
parent | 1192:db4085433e5f |
child | 1273:1b543060f31e |
line wrap: on
line diff
--- a/mod_auth_ldap/mod_auth_ldap.lua Fri Nov 01 18:53:52 2013 -0400 +++ b/mod_auth_ldap/mod_auth_ldap.lua Mon Nov 04 18:13:57 2013 +0100 @@ -43,10 +43,8 @@ function provider.set_password(username, password) local dn, attr = get_user(username); if not dn then return nil, attr end - if attr.password ~= password then - ld:modify(dn, { '=', userPassword = password }); - end - return true + if attr.userPassword == password then return true end + return ld:modify(dn, { '=', userPassword = password })(); end function provider.create_user(username, password) return nil, "Account creation not available with LDAP."; end