I'm new to Craft and (attempting to) create a plugin so that I can import existing users from CSV.
I'm referencing this method:
https://docs.craftcms.com/api/v2/craft-usersservice.html#method-changepassword
In my function, I'm using the following code:
$user = craft()->users->getUserById(6);
$user->newPassword('mynewpassword123');
craft()->users->changePassword($user);
craft()->users->saveUser($user);
Am I completely misunderstanding what this is supposed to do?