Search code examples
javascriptpasswordsquickbloxforgot-password

Quickblox: Change password of other user in Javascript


I'm doing a javascript app with Quickblox and I'm having one problem. I want to have a recover user password function and I have thought that an special user could change another one password. For that I'm using this:

            var params = {password: newPassword, old_password: oldPassword };
            QB.users.update(userId, params, function (error, response) {
                //...
            });

The function only works if I use the same userId of the user connected. I know that there is a forgot password function that is sending mails in Quickblox, however, I would like to not send any mail. What I can do? How can I use QB.users.update properly?

Lot of thanks in advance and best regards


Solution

  • You can't change a password of another users, only yours.

    You can try to use admin account's credentials to change other user's password