-
Hi, But how to save it in md5 way, but not change core setting for password field? Standard Admin UI is used. Is there a setting for this in the field configuration? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
Deltik
Jan 24, 2024
Replies: 1 comment 6 replies
-
You can use Documentation for reference: Descriptionpublic UserHandler::HashPassword(string $password, string $login_name = '', $force = false): string|bool
Parameters
Return Values
Examples$password = "secret";
$login_name = "[email protected]";
$force = PASSWORD_E107_SALT;
$encrypted_password = e107::getUserSession()->HashPassword($password, $login_name, $force);
echo $encrypted_password; Notes
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see that
users_admin_ui::beforeUpdate()
usesUserHandler::HashPassword()
, so I would say mutate the password input in an override ofe_admin_ui::beforeUpdate()
. When rendering the form, leave the password blank to signify no changes, and update the password only if the password field is filled out.