From 71dd160c413a97d374fcf994c0bf0e13d266857f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 21 Jan 2013 14:35:49 +0100 Subject: [PATCH] Fix: uniformize name --- htdocs/webservices/server_user.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 49f95b33a08..a49295c2ee5 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -109,7 +109,7 @@ $server->wsdl->addComplexType( 'pass_indatabase_crypted' => array('name'=>'pass_indatabase_crypted','type'=>'xsd:string'), 'datec' => array('name'=>'datec','type'=>'xsd:dateTime'), 'datem' => array('name'=>'datem','type'=>'xsd:dateTime'), - 'id_thirdparty' => array('name'=>'id_thirdparty','type'=>'xsd:string'), + 'fk_thirdparty' => array('name'=>'fk_thirdparty','type'=>'xsd:string'), 'fk_socpeople' => array('name'=>'fk_socpeople','type'=>'xsd:string'), 'fk_member' => array('name'=>'fk_member','type'=>'xsd:string'), 'datelastlogin' => array('name'=>'datelastlogin','type'=>'xsd:dateTime'), @@ -158,7 +158,7 @@ $server->wsdl->addComplexType( 'all', '', array( - // For thirdparty and contact + // For thirdparty and contact 'name' => array('name'=>'name','type'=>'xsd:string'), 'firstname' => array('name'=>'firstname','type'=>'xsd:string'), 'name_thirdparty' => array('name'=>'name_thirdparty','type'=>'xsd:string'), @@ -304,7 +304,7 @@ function getUser($authentication,$id,$ref='',$ref_ext='') 'pass_indatabase_crypted' => $user->pass_indatabase_crypted, 'datec' => dol_print_date($user->datec,'dayhourrfc'), 'datem' => dol_print_date($user->datem,'dayhourrfc'), -'id_thirdparty' => $user->societe_id, +'fk_thirdparty' => $user->societe_id, 'fk_socpeople' => $user->fk_socpeople, 'fk_member' => $user->fk_member, 'webcal_login' => $user->webcal_login, @@ -498,16 +498,16 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser) $thirdparty->idprof4=$thirdpartywithuser['prof4']; $thirdparty->idprof5=$thirdpartywithuser['prof5']; $thirdparty->idprof6=$thirdpartywithuser['prof6']; - + $thirdparty->client=$thirdpartywithuser['client']; $thirdparty->fournisseur=$thirdpartywithuser['fournisseur']; $socid_return=$thirdparty->create($fuser); - + if ($socid_return > 0) { $thirdparty->fetch($socid_return); - + /* * Contact creation * @@ -526,7 +526,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser) $contact->fax = $thirdparty->fax; $contact_id = $contact->create($fuser); - + if ($contact_id > 0) { /* @@ -535,7 +535,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser) */ $edituser = new User($db); $db->begin(); - + $id = $edituser->create_from_contact($contact,$thirdpartywithuser["login"]); if ($id > 0) { @@ -546,8 +546,8 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser) $error++; $errorcode='NOT_CREATE'; $errorlabel='Object not create : no contact found or create'; } - - + + if (! $error && $id > 0) { $db->commit(); @@ -559,7 +559,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser) $errorcode='NOT_CREATE'; $errorlabel='Contact not create'; } } - + if(!$error) { $objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>'SUCCESS'),'id'=>$socid_return); $error=0;