aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-30 23:44:11 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-30 23:44:11 +0200
commite9c91c19475ed679676829bfd716e41009b560c8 (patch)
tree8a1152fac6bfb613a44e2580f1ee4a8b17774e5e /modules
parenta8c07adeba119ae315b4a8fc5e0501d05f2b8e79 (diff)
downloadNix-e9c91c19475ed679676829bfd716e41009b560c8.tar.gz
Nix-e9c91c19475ed679676829bfd716e41009b560c8.tar.zst
Nix-e9c91c19475ed679676829bfd716e41009b560c8.zip
Allow group users to change their password
Diffstat (limited to 'modules')
-rw-r--r--modules/private/websites/tools/tools/landing/ldap_password.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/private/websites/tools/tools/landing/ldap_password.php b/modules/private/websites/tools/tools/landing/ldap_password.php
index 54448a4..8b1f80f 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){
31 $user_dn = "uid=$user,ou=users,dc=immae,dc=eu"; 31 $user_dn = "uid=$user,ou=users,dc=immae,dc=eu";
32 32
33 if (ldap_bind($con, $user_dn, $oldPassword) === false) { 33 if (ldap_bind($con, $user_dn, $oldPassword) === false) {
34 $message[] = "Error E101 - Current Username or Password is wrong."; 34 $user_dn = "uid=$user,ou=group_users,dc=immae,dc=eu";
35 return false; 35 if (ldap_bind($con, $user_dn, $oldPassword) === false) {
36 $message[] = "Error E101 - Current Username or Password is wrong.";
37 return false;
38 }
36 } 39 }
37 if ($newPassword != $newPasswordCnf ) { 40 if ($newPassword != $newPasswordCnf ) {
38 $message[] = "Error E102 - Your New passwords do not match!"; 41 $message[] = "Error E102 - Your New passwords do not match!";