Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

How to obtain the idnumber of a user using core_user_get_users

$
0
0
by Alberto Mozo Avellaned.  

Hello : 

I'm beggining in the Moodle Webservices. I'm trying to obtain all the fields of an user throught the id. I'm using the  'core_user_get_users' and only return the a few field. 

My code is : 

$params4 = array( 'criteria' => array(0 => array (
'key' => 'id',
'value' => $usuarioid)
));

$functionname = 'core_user_get_users';
$options = array('idnumber');

 try {

  $resp4 = $client1->__soapCall($functionname, $params4);

   print_r($resp4);

.....

and only obtain 

Array ( [users] => Array ( [0] => Array ( [id] => 23 [firstname] => Raul [lastname] => prueba [fullname] => Raul prueba [email] => p@p.com [firstaccess] => 0 [lastaccess] => 0 [profileimageurlsmall] => http:///aula/pluginfile.php?file=%2F816%2Fuser%2Ficon%2Ff2 [profileimageurl] => http:///aula/pluginfile.php?file=%2F816%2Fuser%2Ficon%2Ff1 ) ) [warnings] => Array egg )

How can I add fields to this answer?  

I'm trying to using other array in the function call but I'm lost.

Thanks in advance.


Alberto Mozo




Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>