IOS Current User Switches when editing another users properties...

Hi Backendless,
I hope you know about this but here goes…
In my app I need to update ‘another’ user properties other than the current user but when I do the current user switches to the user I just edited details of! VERY WEIRD!
Anyway am I doing something wrong thats calling some sort of user switch?
Here is my code:
BackendlessDataQuery *query = [BackendlessDataQuery query];

query.whereClause = [NSString stringWithFormat:@“objectId = ‘%@’”, sellerID];

BackendlessCollection *collection = [[backendless.persistenceService of:[BackendlessUser class]] find:query];

NSArray *array = [collection getCurrentPage];

NSMutableArray *mutableArray = [[NSMutableArray alloc]initWithArray:array];

BackendlessUser *userProps = [mutableArray objectAtIndex:0];

NSNumber *sellersSold = [userProps getProperty:@“itemsSold”];
NSNumber *sellersStarRating = [userProps getProperty:@“starRating”];

NSNumber *newSellersSold = [NSNumber numberWithFloat:([sellersSold floatValue] + 1)];
NSNumber *newSellersStarRating = [NSNumber numberWithFloat:([sellersStarRating floatValue] + 5)];

@try {

[userProps updateProperties:@{@“itemsSold” : newSellersSold, @“starRating” : newSellersStarRating}];
userProps = [backendless.userService update:userProps];
NSLog(@“User has been RATED: %@”, userProps);

}
@catch (Fault *fault) {
NSLog(@“USER NOT RATED BECAUSE OF FAULT: %@”, fault);
}
Thanks in advance
Steve

The weird thing is that my FB token still gives me the original users FB profile picture and user name.

Hi Steve,

The answer is right in the SDK code:

When you call update, the updated user object goes through the onLogin sequence.

To avoid this, you can update the user object using the backendless.persistenceService save method.

Regards,
Mark

Mark! Your a star! I think also its not just learning the code but the methods in the SDK… It will come…

Congrats on the growth by the way. Like I said before I wish I found Backendless years ago and I think a lot of people are seeing this too. You have a really good business model.

Thanks, Steve! The fix of the erroneous onLogin call is already in place. We will update the SDK on our website shortly.

Regards,
Mark

Top top stuff!

Now you can get the latest lib from github.