wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
338 stars 129 forks source link

Updating User Password #158

Closed piotrgulbis closed 5 years ago

piotrgulbis commented 5 years ago

Updating a user and passing a password, doesn't seem to update the password.

Any way to do this?

pilotkid commented 5 years ago

Can you post your code?

polushinmk commented 5 years ago

@piotrgulbis Hi! this code works for me, password changes successfull

// you should authenticated before
            var user = await _clientAuth.Users.GetByID(111);
            user.Password = "NewTestPassword1";

            var updatedUser = await _clientAuth.Users.Update(user);