I am using this code to update a user's password:
QBUUser *usertemp = [QBUUser user];
usertemp.ID = [LocalStorageController shared].qbUser.ID;
usertemp.oldPassword = [defaults objectForKey:@"password"];
usertemp.password = self.passwordField.text;
[QBRequest updateUser:usertemp successBlock:^(QBResponse *response, QBUUser *user) {
// User updated successfully
} errorBlock:^(QBResponse *response) {
NSString *errorMessage = [[response.error description] stringByReplacingOccurrencesOfString:@"(" withString:@""];
errorMessage = [errorMessage stringByReplacingOccurrencesOfString:@")" withString:@""];
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Oops!"
message:errorMessage
delegate:nil
cancelButtonTitle:@"Got it"
otherButtonTitles: nil];
[myAlertView show];
}];
However, I am receiving an error: "Incorrect old password provided." The old password is definitely correct because I use it to log in to the session. The new password is at least 8 characters long every time I try. Why can't I update the user's password?
Thanks.
What SDK version do you use?
It was a fix for 2.x API in version 2.0.6 http://quickblox.com/developers/IOS#Framework_changelog:
If you use a newer version - can you post your Xcode log of this request