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='[email protected]'; 
$records = $record; $pass='test1'; 
$results = $client->createObject($records,$pass);
        print_r($results);
} 

Your problem is here:

 

$results = $client->createObject($records,$pass);

 

Check the implementation of createObject() it's possible they refuse gmail.com as an e-mail address.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.