diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 6a36f81a96a..4523916d854 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -91,7 +91,8 @@ if ($_POST["action"] == 'add' && $user->admin) $action="create"; // Go back to create page } - if (! $message) { + if (! $message) + { $edituser = new User($db,0); $edituser->nom = trim($_POST["nom"]); @@ -184,7 +185,7 @@ if ($_POST["action"] == 'update' && $user->admin) // Si une photo est fournie avec le formulaire if (! is_dir($conf->users->dir_output)) { - mkdir($conf->users->dir_output); + create_exdir($conf->users->dir_output); } if (is_dir($conf->users->dir_output)) { $newfile=$conf->users->dir_output . "/" . $edituser->id . ".jpg"; @@ -204,14 +205,30 @@ if ($_POST["action"] == 'update' && $user->admin) } -if ($_GET["action"] == 'password' && $user->admin) +if (($_GET["action"] == 'password' || $_GET["action"] == 'passwordsend') && $user->admin) { $edituser = new User($db, $_GET["id"]); $edituser->fetch(); - if ($edituser->password($user,'',$conf->password_encrypted)) + $newpassword=$edituser->password($user,'',$conf->password_encrypted); + if ($newpassword < 0) { - $message = '