root/devel/mod/rpc/xmlrpc/library_elgg_user.php

Revision 470, 0.6 kB (checked in by misja, 2 years ago)

Fixing the network visualization demo revealed quite a bit of leftover bugs.

  • Property svn:eol-style set to native
Line 
1 <?php
2     /*
3      *  Functions for accessing user properties
4      */
5
6     function getUserIcon($params, $method)
7     {
8         // Number of parameters
9         $nr_params = 1;
10
11         // Do we have the required number of parameters?
12         if (count($params) != $nr_params)
13         {
14             // Raise an XML-RPC error
15             return new IXR_Error(-32602, "Invalid method parameters");
16         }
17
18         // Parse parameters
19         $username = $params;
20
21         $user = run('users:instance', array('user_id' => $username));
22
23         return $user->getUserIcon();
24     }
25 ?>
26
Note: See TracBrowser for help on using the browser.