55 return 'Traditional XOOPS avatars.';
83 if (is_object($userinfo)) {
84 if (is_a($userinfo,
'XoopsUser')) {
85 if ($userinfo->getVar(
'user_avatar')
86 &&
'blank.gif' != $userinfo->getVar(
'user_avatar')
88 $response->setValue($this->xoops_upload_url .
"/" . $userinfo->getVar(
'user_avatar'));
92 } elseif (is_array($userinfo)) {
93 if (!empty($userinfo[
'user_avatar']) && $userinfo[
'user_avatar'] !=
'blank.gif') {
94 $response->setValue($this->xoops_upload_url .
"/" . $userinfo[
'user_avatar']);
97 } elseif (is_scalar($userinfo)) {
99 if (is_object(
$user) && is_a(
$user,
'XoopsUser')) {
100 if (
$user->getVar(
'user_avatar')
101 &&
'blank.gif' !=
$user->getVar(
'user_avatar')
103 $response->setValue($this->xoops_upload_url .
"/" .
$user->getVar(
'user_avatar'));
109 $response->setSuccess(
false)->addErrorMessage(
'User info is invalid');
124 if (is_a($userinfo,
'XoopsUser')) {
125 $link = $this->xoops_url .
'/modules/avatars/editavatar.php';
130 $response->setSuccess(
false)->addErrorMessage(
'User info is invalid');
getAvatarUrl($response, $userinfo)
getAvatarEditUrl($response,\XoopsUser $userinfo)
if(!$xoops->isUser()) $uid
if($xoops->isUser()&&$isAdmin) $response