registerUser:securityConfig:password:error:isSyncFlag:(NSString *, NSString *, NSString *, NSError **, BOOL) method

Registers the client with the server by automatically creating a user with the help of a pre-defined authentication mechanism.

Syntax

public virtual BOOL registerUser:securityConfig:password:error:isSyncFlag: (NSString * userName, NSString * securityConfig, NSString * loginPassword, NSError ** error, BOOL isSynchronous)

Parameters

Returns

BOOL indicating if the user registration has been successful. Significant in case of synchronous registration only. Usage (Synchronous registration) ODPUserManager* userManager = [ODPUserManager getInstance:"ApplicationId"]; [userManager setConnectionProfileWithHost:@"hostname" port:5001 farm:@"farmid" error:nil]; NSError* error = nil; if ([userManager registerUser:"username" securityConfig:@"securityconfig" password:@"password" error:&error isSyncFlag:YES]) { // Further processing } else { // Error handling using the error object defined above } Usage (Asynchronous Registration) ODPUserManager* userManager = [ODPUserManager getInstance:"ApplicationId"]; [userManager setConnectionProfileWithHost:@"hostname" port:5001 farm:@"farmid" error:nil]; [userManager setDelegate:self]; // The class implementing the listener methods should adhere to <ODPUserManagerDelegate> protocol [userManager registerUser:"username" securityConfig:@"securityconfig" password:@"password" error:nil isSyncFlag:NO];