registerUser:password:captchaText:error:isSyncFlag: method
Static method which registers the client with the server by automatically creating a user with the help of a pre-defined authentication mechanism along with Captcha Text.
Syntax
-
(
BOOL
)
registerUser
:
(
NSString *
)
userName
password
:
(
NSString *
)
loginPassword
captchaText
:
(
NSString *
)
captchaText
error
:
(
NSError **
)
error
isSyncFlag
:
(
BOOL
)
isSynchronous
Parameters
-
userName –
User Name that will be authorised by a predefined security provider
-
loginPassword –
Password for that user
-
captchaText –
Captcha Text provided by the user shown in the image
-
error –
A double pointer to the error object that the application will pass to the function call and which will be populated by the function call in case of any errors within.
-
isSynchronous –
A flag indicating whether the user registration has to happen synchronously or in an asynchronous manner
Returns
Returns a BOOL indicating if the user registration has been successful. Significant in case of synchronous registration only.
Example 1
NSError* error = nil;
[userManager registerUser:"username" password:@"password" captchaText:@"captchText" error:&error isSyncFlag:NO])