Update user password I'm trying to update a user password on save via a custom field (on registration via the back-end - the admin needs to specify a password on registering a user). Is this even possible?

Came across this question How do I change a user&#39;s password programmatically in a plugin? and tried using the users.onBeforeSaveUser event to update the $user-&gt;newPassword but the user cannot login with the details registered/created.

Any thoughts on above appreciated!
You can't use the users.onBeforeSaveUser event to set a user's password as this event happens after the supplied password has been hashed by a private method in the UsersService.

Instead, you could use the users.onSaveUser event, check if a new user has just been saved and if so add the password to the userModel and re-save it. The following is untested, but should do the trick:

    craft()-&gt;on('users.saveUser', function(Event $event) {

        // Only fire if new user, this should avoid an infinite loop
        if ($event-&gt;params['isNewUser']) {

            // retrieve the userModel from the event
            $user = $event-&gt;params['user'];

            // set new password
            $user-&gt;newPassword = 'My Super Secret Password';

            // save user
            if (craft()-&gt;users-&gt;saveUser($user))
            {
                // Password successfully saved!
            }
            else
            {
                // Oops, something went wrong!
            }
        }
    });