X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprivate%2Fwebsites%2Ftools%2Ftools%2Flanding%2Fldap_password.php;h=b6079e5449840098cceedc77e55f9732c606175c;hb=4c42e0beb65d2a92e988a81aa12f50aa6bd1f820;hp=54448a46c9379b04e61a24985f7c9f3ef2ee9120;hpb=251c0a135a4153453030dc0e2c132e57934c0095;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/tools/landing/ldap_password.php b/modules/private/websites/tools/tools/landing/ldap_password.php index 54448a4..b6079e5 100644 --- a/modules/private/websites/tools/tools/landing/ldap_password.php +++ b/modules/private/websites/tools/tools/landing/ldap_password.php @@ -31,8 +31,11 @@ function changePassword($user,$oldPassword,$newPassword,$newPasswordCnf){ $user_dn = "uid=$user,ou=users,dc=immae,dc=eu"; if (ldap_bind($con, $user_dn, $oldPassword) === false) { - $message[] = "Error E101 - Current Username or Password is wrong."; - return false; + $user_dn = "uid=$user,ou=group_users,dc=immae,dc=eu"; + if (ldap_bind($con, $user_dn, $oldPassword) === false) { + $message[] = "Error E101 - Current Username or Password is wrong."; + return false; + } } if ($newPassword != $newPasswordCnf ) { $message[] = "Error E102 - Your New passwords do not match!"; @@ -83,7 +86,7 @@ Immae / Ismaël", "From: " . getenv("CONTACT_EMAIL")); Password Change Page - +