Skip to content

Instantly share code, notes, and snippets.

@nfabre
Created November 30, 2010 08:26
Show Gist options
  • Save nfabre/721352 to your computer and use it in GitHub Desktop.
Save nfabre/721352 to your computer and use it in GitHub Desktop.
list-user.php
<?php
// Recuperation du "UserDirectory" pour effectuer la recherche
$userDirectory = $serviceContent->returnval->userDirectory;
// Chaine de recherche
$searchStr ='r';
// Creation de la requete SOAP
$soapMessage = array(
'_this' => new SoapVar($userDirectory->{'_'}, XSD_STRING, $userDirectory->type),
'domain' => null,
'searchStr' => $searchStr,
'belongsToGroup' => null,
'belongsToUser' => null,
'exactMatch' => new \SoapVar(false,XSD_BOOLEAN),
'findUsers' => new \SoapVar(true,XSD_BOOLEAN),
'findGroups' => new \SoapVar(false,XSD_BOOLEAN)
);
// Recherche l'ensemble des utilisateurs ayant un "r"
$result = $connection->RetrieveUserGroups($soapMessage);
var_dump($result->returnval);
/**
* array(12) {
[0]=>
object(stdClass)#32 (5) {
["principal"]=>
string(8) "raptor"
["fullName"]=>
string(8) "raptor"
["group"]=>
bool(false)
["id"]=>
int(11)
}
...
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment