CS fixes, updated changelog

pull/5468/head
Aleksander Machniak 8 years ago
parent 7f4ab8c14a
commit affec47eab

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Password: Added LDAP PPolicy driver (#5364)
- Implement separate action to mark all messages in a folder as \Seen (#5006) - Implement separate action to mark all messages in a folder as \Seen (#5006)
- Implement marking as \Seen in all folders or in a folder and its subfolders (#5076) - Implement marking as \Seen in all folders or in a folder and its subfolders (#5076)
- Archive: Don't reload messages list when it's not needed (#5225) - Archive: Don't reload messages list when it's not needed (#5225)

@ -6,11 +6,9 @@
* Driver that adds functionality to change the user password via * Driver that adds functionality to change the user password via
* the 'change_ldap_pass.pl' command respecting password policy (history) in LDAP. * the 'change_ldap_pass.pl' command respecting password policy (history) in LDAP.
* *
*
* @version 1.0 * @version 1.0
* @author Zbigniew Szmyd <zbigniew.szmyd@linseco.pl> * @author Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
* *
*/ */
class rcube_ldap_ppolicy_password class rcube_ldap_ppolicy_password
@ -74,7 +72,6 @@ class rcube_ldap_ppolicy_password
return PASSWORD_SUCCESS; return PASSWORD_SUCCESS;
case "Password is in history of old passwords": case "Password is in history of old passwords":
return PASSWORD_IN_HISTORY; return PASSWORD_IN_HISTORY;
case "Cannot connect to any server": case "Cannot connect to any server":
return PASSWORD_CONNECT_ERROR; return PASSWORD_CONNECT_ERROR;
default: default:
@ -96,5 +93,4 @@ class rcube_ldap_ppolicy_password
rcube::write_log('password_ldap_ppolicy', $str); rcube::write_log('password_ldap_ppolicy', $str);
} }
} }
} }

@ -50,7 +50,8 @@ if ($active_server){
} else { } else {
# Wyszukanie usera wg filtra # Wyszukanie usera wg filtra
$PAR{'filter'} =~ s/\%login/$PAR{'user'}/; $PAR{'filter'} =~ s/\%login/$PAR{'user'}/;
my @search_args = (base => $PAR{'base'}, my @search_args = (
base => $PAR{'base'},
scope => 'sub', scope => 'sub',
filter => $PAR{'filter'}, filter => $PAR{'filter'},
attrs => ['1.1'], attrs => ['1.1'],
@ -67,9 +68,7 @@ if ($active_server){
if ($result->code){ if ($result->code){
print $result->error; print $result->error;
} else { } else {
$result = $ldap->set_password( $result = $ldap->set_password(newpasswd => $PAR{'new_pass'});
newpasswd => $PAR{'new_pass'},
);
if ($result->code) { if ($result->code) {
print $result->error; print $result->error;
} else { } else {
@ -80,7 +79,6 @@ if ($active_server){
print "User not found in LDAP\n" if $count == 0; print "User not found in LDAP\n" if $count == 0;
print "Found $count users\n"; print "Found $count users\n";
} }
} }
} }
$ldap->unbind(); $ldap->unbind();

Loading…
Cancel
Save