Set value for field "user_avatar"

@param  string $avatar
@return $this
550925
public function setAvatar($avatar)
    {
        $avatar = (string) $avatar;

        if ($this->exists() && $this->avatar !== $avatar) {
            $this->updated['avatar'] = true;
        }

        $this->avatar = $avatar;

        return $this;
    }
377545
public function setImage(string $image)
    {
        $this->image = $image;

        $this->raw = array_merge($this->raw, ['Image' => $image]);

        return $this;
    }
777854
public function avatar($email) {
		if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
			$baseUrl = $this->useHttps ? $this->https($this->baseUrl) : $this->baseUrl;
			$url = $baseUrl . "avatar/" . $this->generateHash($email);
		} else {
			throw new InvalidArgumentException("The avatar filter must be passed a valid Email address");
		}

		if ($this->rating) {
			$url = $this->rating($url, $this->rating);
		}

		if ($this->size) {
			$url = $this->size($url, $this->size);
		}

		if ($this->default) {
			$url = $this->def($url, $this->default);
		}

		return $url;
	}
288113
public function changeAvatar($nick, $id_avatar)
    {
        if (!is_numeric($id_avatar) || 0 >= $id_avatar) {
            throw new InvalidArgumentException(
                "RealtimeChangeAvatar id_avatar field should be positive integer", 404);
        }

        if (empty($nick)) {
            throw new InvalidArgumentException(
                "RealtimeChangeAvatar nick field should not be empty", 404);
        }

        $command = $this->client->getCommand('RealtimeChangeAvatar', array('nick' => $nick, 'id' => $id_avatar));
        return $this->executeCommand($command);
    }
286309
public function avatarAction ()
    {
        $finder = new Finder();
        $result = array();
        $finder->files()->in(__DIR__.'/../Resources/public/avatar')->name('*.png');
        foreach ($finder as $files) {
            $result[$files->getRelativePath()][] = $files->getRelativePathname();
        }
        $user = $this->getUser();
        $gravatar = new Gravatar();
        $gravatar->setAvatarSize(150);
        return $this->render('OlixSecurityBundle:Profile:avatar.html.twig', array(
            'avatars' => $result,
            'gravatar' => $gravatar->get($user->getEmail()),
        ));
    }
456597
public function setUser($user)
    {

        // Clear cache
        $this->user = null;

        // Find element
        if (!$user = $this->findUserElement($user)) {
            // Clear property / cache
            $this->userId = $this->user = null;
        } else {
            // Set property
            $this->userId = $user->getId();

            // Set cache
            $this->user = $user;
        }

        return $this;
    }
242969
public function setProfile($profile) {
		if (is_string($profile)) {
			$profile = new Profile($profile);
		}
		$this->profile = $profile;
		return $this;
	}
1243611
public function changeAvatarPath($path)
    {
        $this->avatar_url = $path;

        $this->raise(new AvatarChanged($this));

        return $this;
    }
58951
public function setFrom($value)
    {
        if (is_array($value)) {
            $value = new Person($value);
        }
        return $this->setParameter('from', $value);
    }
493801
public function set($attribute, $value = null)
    {
        if (is_array($attribute)) {
            foreach ($attribute as $key => $value) {
                $this[$key] = $value;
            }
        } else {
            $this[$attribute] = $value;
        }
        return $this;
    }
1162664
public function setAvatar(\WobbleCode\UserBundle\Document\Avatar $avatar)
    {
        $this->avatar = $avatar;

        return $this;
    }
1345673
public function actionAvatar()
    {
        $model = new AvatarForm();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated'));
        }
        return $this->render('avatar', [
            'model' => $model,
        ]);
    }
1272879
public WebhookMessageBuilder setAvatarUrl(String avatarUrl)
    {
        this.avatarUrl = Helpers.isBlank(avatarUrl) ? null : avatarUrl;
        return this;
    }
897849
def users_set_avatar(self, avatar_url, **kwargs):
        """"""
        if avatar_url.startswith('http://') or avatar_url.startswith('https://'):
            return self.__call_api_post('users.setAvatar', avatarUrl=avatar_url, kwargs=kwargs)
        else:
            avatar_file = {"image": open(avatar_url, "rb")}
            return self.__call_api_post('users.setAvatar', files=avatar_file, kwargs=kwargs)
272841
public function setAvatar($id, $file)
    {
        return $this->post($this->getPath().'/'.rawurlencode($id).'/avatar', array('file' => $file));
    }
602303
public function setIcon($icon)
    {
        if (in_array(
            $icon,
            $this->validIcons
        )) {
            $this->icon = $icon;
        }

        return $this;
    }
1106645
public function setAttribute($attribute, $value)
    {
        Arr::set($this->attributes, $attribute, $value);

        return $this;
    }