Sample Code (PHP Toolkit 2012.2 and above)
Sunday, June 2, 2019
Web Services (SuiteTalk) : PHP Toolkit 2012.2 and above > Change Email
Use the changeEmail operation to change a user's email. Below is a sample code demonstration how to change password using PHP Toolkit 2012.2 and above.
currentPassword = 'xxxxxx';$changeEmail->newEmail = "test@email.com";$changeEmail->newEmail2 = "test@email.com";$changeEmail->justThisAccount = true;$changeEmailRequest = new ChangeEmailRequest();$changeEmailRequest->changeEmail = $changeEmail;$response = $service->changeEmail($changeEmailRequest);if($response->sessionResponse->status->isSuccess){ echo "Your Email has been Successfully CHANGED";}else{ $statusDetails = $response->sessionResponse->status->statusDetail; foreach($statusDetails as $statusDetail) { echo $statusDetail->code; echo $statusDetail->type .": " . $statusDetail->message; }}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment