User Signup

You can add a new user to your Catalyst app by calling the signUp() method. You must pass the user instance defined here as the argument to the signUp() method.

The code syntax for user signup is given below:

    
copy
ZCatalystApp.shared.signUp(user: ZCatalystUser, completion: @escaping (Result<( ZCatalystUser, Int64 ), ZCatalystError >) -> Void)

Parameters:

  • user: The user instance created before this operation
  • completion: If the call executes successfully, the completion block returns the user object with an UserID, ZUID, Org ID, etc assigned for the user. Else, it returns an error.

A sample code snippet is shown below:

    
copy
let userobj = ZCatalystApp.shared.newUser( lastName : "McRogan", email : "timothy.mcrogan@zylker.com") //Replace this with the last name and email address of the user ZCatalystApp.shared.signUp(user: userobj) { ( result ) in switch result{ case .success ( let result ) : print("The user \(result.0.firstName) in org \(result.1) has been successfully signed up.") case .error( let error ) : print( "Error occurred >>> \( error )" ) } }

Last Updated 2023-09-03 01:06:41 +0530 +0530

ON THIS PAGE