User lock don't work with iOS SDK

0 votes

Hi, I'm trying to add ban feature for particular user. So, I'm doing it in this way:

NSString *userName = [[NSUserDefaults standardUserDefaults] stringForKey:@"identity"];
    UserService *userService = [App42API buildUserService];
    [userService getUser:userName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) {
        if (success)
            User *user = (User*)responseObj;
            NSLog(@"userName is %@" , user.userName);
            NSLog(@"emailId is %@" ,;
            NSString *jsonResponse = [user toString];
            if (user.isAccountLocked) {
                NSLog(@"Account locked");
            } else {
                NSLog(@"Account not locked");
            NSLog(@"Exception is %@",[exception reason]);
            NSLog(@"HTTP error Code is %d",[exception httpErrorCode]);
            NSLog(@"App Error Code is %d",[exception appErrorCode]);
            NSLog(@"User Info is %@",[exception userInfo]);

I locked user on backend admin panel, but log still the same: "Account not locked".

asked Apr 7, 2016 in iOS by victorshablyko (11 points)

1 Answer

+1 vote

Hello Victor,

Please download the updated SDK from here and try. Let me know if issue continues.


answered Apr 8, 2016 by rajeev.etc (1,660 points)
edited Apr 9, 2016 by rajeev.etc
You was right, somehow I used older sdk. now it works
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on