本文整理汇总了PHP中SoapClient::updateUser方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::updateUser方法的具体用法?PHP SoapClient::updateUser怎么用?PHP SoapClient::updateUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapClient
的用法示例。
在下文中一共展示了SoapClient::updateUser方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateProfile
/**
* Update profile
*
* @return Response
*/
public function updateProfile()
{
$session = Session::get('user');
$userService = new SoapClient(Config::get('wsdl.user'), array());
$geoService = new SoapClient(Config::get('wsdl.utility'), array());
$currentUser = $userService->getUserByEmail(array('email' => $session['data']->email))->user;
$currentUser->businessName = Input::get('businessName');
$currentUser->about = Input::get('about');
$currentUser->address = $geoService->getAddressByZipcode(array("zipcode" => Input::get('zipCode')))->address;
$currentUser->website = Input::get('website');
$currentUser->contactName = Input::get('contactName');
$currentUser->contactNumber = Input::get('contactNumber');
$currentUser->email = Input::get('email');
try {
$userService->updateUser(array('user' => $currentUser));
} catch (Exception $ex) {
}
}
示例2: profile
public function profile()
{
$file = Input::file('uploader');
$destinationPath = app_path() . '/storage/uploads/';
$filename = $file->getClientOriginalName();
Input::file('uploader')->move($destinationPath, $filename);
$image = ImageModel::createImageModel($filename);
try {
$session = Session::get('user');
$userService = new SoapClient(Config::get('wsdl.user'));
$currentUser = $userService->getUserById(array("userId" => $session['data']->id));
$currentUser = $currentUser->user;
$currentUser->avatar = $image;
$result = $userService->updateUser(array("user" => $currentUser));
return Response::json($result->complete);
} catch (Exception $ex) {
}
}
示例3: updateProfile
/**
* Update profile
*
* @return Response
*/
public function updateProfile()
{
$session = Session::get('user');
$userService = new SoapClient(Config::get('wsdl.user'), array());
$geoService = new SoapClient(Config::get('wsdl.utility'), array());
$currentUser = $userService->getUserByEmail(array('email' => $session['data']->email))->user;
if (!$currentUser->address) {
$address = new Address();
} else {
$address = new Address($currentUser->address);
}
$currentUser->firstName = Input::get('first_name');
$currentUser->lastName = Input::get('last_name');
$currentUser->about = Input::get('about');
if (Input::get('zipCode')) {
$address = $geoService->getAddressByZipcode(array("zipcode" => Input::get('zipCode')));
$currentUser->address = $address->address;
} else {
if (Input::get('zipCode') == "") {
$currentUser->address = new Address();
}
}
try {
$userService->updateUser(array('user' => $currentUser));
} catch (Exception $ex) {
}
}
示例4: array
<?php
// client
$options = array('location' => 'http://localhost/soap/user.php', 'uri' => 'http://localhost/soap/');
// $client=new SoapClient("user.wsdl");
$client = new SoapClient("http://localhost/soap/user.php?wsdl");
// var_dump($client->register('Goh','aasd','goh.puayhiang@Outlook.com',''));
// var_dump($client->login('goh.puayhiang@Outlook.com','aasd',''));
// var_dump($client->activateAccount('goh.puayhiang@Outlook.com','24419'));
// var_dump($client->recaptchaKey());
$temp = array("Name" => "Puay Hiang", "Email" => "gph004@yahoo.com.sg", "Password" => "asd");
//,"Password"=>"Hello"
$Email = "gph004@yahoo.com.sg";
$Password = "asd";
$SessionKey = $client->login($Email, $Password, "asd")[1];
echo $SessionKey;
var_dump($client->updateUser(json_encode($temp), $Password, $SessionKey));
示例5: destroy
/**
* Delete store
*
* @return Response
*/
public function destroy($id)
{
$session = Session::get('user');
$userService = new SoapClient(Config::get('wsdl.user'), array());
$currentUser = $userService->getUserByEmail(array('email' => $session['data']->email))->user;
if (is_object($currentUser->addresses)) {
$currentUser->addresses = array($currentUser->addresses);
}
$addresses = $currentUser->addresses;
foreach ($addresses as $k => $val) {
if ($val->id == $id) {
$val->deleted = true;
$addresses[$k] = $val;
}
}
$currentUser->addresses = $addresses;
try {
$userService->updateUser(array('user' => $currentUser));
} catch (Exception $ex) {
}
}
示例6: out
function out($str)
{
echo $str . "\n";
}
ini_set('soap.wsdl_cache_enabled', 0);
$username = 'admin';
//$_POST['username'];
$password = 'secret';
//md5($_POST['password']);
//$client = new SoapClient("https://srvfh13.fh-luebeck.de/moodle/moodleplugin.wsdl",array('trace'=>1,'login'=>$username,'password'=>$password));
$client = new SoapClient("https://www.myserver.com/moodle/moodleplugin.wsdl");
try {
$sessid = '';
out($sessid = $client->login($username, $password));
out($client->addUser($sessid, 'testheinz', '1234', 'Heinz', 'Test', 'anonymous@somewhere.de'));
out($client->updateUser($sessid, 'testheinz', 'Heinzi', 'Tester', 'someone@somewhere.de'));
out($sessid = $client->logout($sessid));
out($client->deleteUser($sessid, 'testheinz'));
//echo $client->exportUsers(2, 'CF101');
//echo $client->importCourses($xml_string,"Prova");
//echo $client->exportCourses();
//echo $client->exportCourses(3,"Prova");
//echo $client->exportCategories();
} catch (SoapFault $sf) {
//echo $client->__getLastRequest();
echo $client->__getLastResponse();
echo $sf->faultstring;
}
/*else
{
if (empty($_SERVER[HTTPS])) {