Jump to content

Invalid Email Address Exception when calling SoftLayer_User_Customer::createObje


sujana

Recommended Posts

Any help would be appreciable. I'm trying to create a user record through the API using SoftLayer_User_Customer::createObject(). I think I am passing the required object properties in a StdClass $object - but it shows an exception that invalid email address.But i put a valid email address.This have been eating my head for two days.Please help me to figure out this..

 

 

this is my code

 


function createUserAccount(){
$client = SoftLayer_client::getClient("User_Customer"); 
$record = new stdClass(); 
$record->companyName='company'; 
$record->city='city'; 
$record->address1='address1';
$record->accountId=(int)123;
$record->country='country'; 
$record->postalCode = (int)12345; 
$record->firstName='firstName'; 
$record->lastName='lastName';
$record->username='username';
$record->email='demo@gmail.com'; 
$records = $record; $pass='test1'; 
$results = $client->createObject($records,$pass);
        print_r($results);
} 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.