feat: enhance user creation and editing with role assignment and secure password handling (ldaps merci guillaume)

This commit is contained in:
Morph01
2025-02-05 02:55:25 -08:00
committed by Morph01
parent fcc7e22fdb
commit 0fac3057b8
4 changed files with 65 additions and 6 deletions

View File

@@ -29,8 +29,10 @@ if (!empty($_POST['email'])) {
$attributes['mail'] = [$_POST['email']];
}
$_crypted_new_password = iconv('UTF-8', 'UTF-16LE', '"' . $_POST['new_password'] . '"');
if (!empty($_POST['new_password'])) {
$attributes['userPassword'] = [$_POST['new_password']];
$attributes['unicodePwd'] = $_crypted_new_password;
}
$ldapAuth = new LDAPAuth();