sujana Posted September 16, 2010 Share Posted September 16, 2010 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); } Quote Link to comment Share on other sites More sharing options...
ignace Posted September 16, 2010 Share Posted September 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.