diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-10-18 14:50:10 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-10-18 14:50:10 +0200 |
commit | d26e94ae9456c6bf13392884e28a32c60f7301b0 (patch) | |
tree | 98eb2794f494f34cf458490c719324cfd4750c61 /plugins | |
parent | ced34cb15e095836767971aa4d27b141fb1d7ec9 (diff) |
Small CS fixes after PR merge
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/password/drivers/ldap.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php index 2d29a55b9..ac2ea3bd3 100644 --- a/plugins/password/drivers/ldap.php +++ b/plugins/password/drivers/ldap.php @@ -38,7 +38,8 @@ class rcube_ldap_password // Building user DN if ($userDN = $rcmail->config->get('password_ldap_userDN_mask')) { $userDN = self::substitute_vars($userDN); - } else { + } + else { $userDN = $this->search_userdn($rcmail); } @@ -78,27 +79,26 @@ class rcube_ldap_password return PASSWORD_CONNECT_ERROR; } - $encodage = $rcmail->config->get('password_ldap_encodage'); + $force = $rcmail->config->get('password_ldap_force_replace'); + $pwattr = $rcmail->config->get('password_ldap_pwattr'); + $lchattr = $rcmail->config->get('password_ldap_lchattr'); + $smbpwattr = $rcmail->config->get('password_ldap_samba_pwattr'); + $smblchattr = $rcmail->config->get('password_ldap_samba_lchattr'); + $samba = $rcmail->config->get('password_ldap_samba'); + $encodage = $rcmail->config->get('password_ldap_encodage'); // Support multiple userPassword values where desired. // multiple encodings can be specified separated by '+' (e.g. "cram-md5+ssha") - $encodages = explode('+',$encodage); + $encodages = explode('+', $encodage); $crypted_pass = array(); - foreach($encodages as $enc) { + foreach ($encodages as $enc) { $cpw = self::hash_password($passwd, $enc); - if(!empty($cpw)) { + if (!empty($cpw)) { $crypted_pass[] = $cpw; } } - $force = $rcmail->config->get('password_ldap_force_replace'); - $pwattr = $rcmail->config->get('password_ldap_pwattr'); - $lchattr = $rcmail->config->get('password_ldap_lchattr'); - $smbpwattr = $rcmail->config->get('password_ldap_samba_pwattr'); - $smblchattr = $rcmail->config->get('password_ldap_samba_lchattr'); - $samba = $rcmail->config->get('password_ldap_samba'); - // Support password_ldap_samba option for backward compat. if ($samba && !$smbpwattr) { $smbpwattr = 'sambaNTPassword'; @@ -347,7 +347,7 @@ class rcube_ldap_password break; case 'cram-md5': - require_once(dirname(__FILE__).'/../helpers/dovecot_hmacmd5.php'); + require_once __DIR__ . '/../helpers/dovecot_hmacmd5.php'; return dovecot_hmacmd5($password_clear); break; |