Back to PhocaGalleryUser class

Method getUserAvatar

public static
getUserAvatar
(mixed $userId)

Method getUserAvatar - Source code

public static function getUserAvatar($userId)
{
    $db = Factory::getDBO();
    $query = 'SELECT a.*' . ' FROM #__phocagallery_user AS a' . ' WHERE a.userid = ' . (int) $userId;
    $db->setQuery($query);
    $avatar = $db->loadObject();
    if (isset($avatar->id)) {
        return $avatar;
    }
    return false;
}