|
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 |
|
|---|
| 9 |
$nr_params = 1; |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
if (count($params) != $nr_params) |
|---|
| 13 |
{ |
|---|
| 14 |
|
|---|
| 15 |
return new IXR_Error(-32602, "Invalid method parameters"); |
|---|
| 16 |
} |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
$username = $params; |
|---|
| 20 |
|
|---|
| 21 |
$user = run('users:instance', array('user_id' => $username)); |
|---|
| 22 |
|
|---|
| 23 |
return $user->getUserIcon(); |
|---|
| 24 |
} |
|---|
| 25 |
?> |
|---|
| 26 |
|
|---|