Welcome Guest, Not a member yet? Register   Sign In
Mythauth - update password form

(This post was last modified: 06-21-2021, 07:11 AM by kilishan.)

Alternatively, you could do something a little simpler like:

$userModel = model('UserModel');
$user = user();
$user->password = $this->request->getPost('password');

This grabs the currently logged in user via the user() helper function and returns a User entity. The setPassword() method is called automatically by the Entity class when you assign the password to the user entity, so simply assigning it like that will automatically hash the password. Then the User entity is saved.

new release myth-auth, its easier to set password now.
can call direct: Password::hash($password);

Theme © iAndrew 2016 - Forum software by © MyBB