]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/tools/landing/ldap_password.php
Add assets website for immae
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / tools / landing / ldap_password.php
index 54448a46c9379b04e61a24985f7c9f3ef2ee9120..b6079e5449840098cceedc77e55f9732c606175c 100644 (file)
@@ -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"));
 <head>
 <title>Password Change Page</title>
 <meta name="viewport" content="width=device-width, initial-scale=1" />
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" integrity="sha256-2YQRJMXD7pIAPHiXr0s+vlRWA7GYJEK0ARns7k2sbHY=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://assets.immae.eu/skeleton/2.0.4/skeleton.min.css" integrity="sha256-2YQRJMXD7pIAPHiXr0s+vlRWA7GYJEK0ARns7k2sbHY=" crossorigin="anonymous" />
 <style type="text/css">
   body { font-family: Verdana,Arial,Courier New; margin: auto; }