updated avatar by userid
514195
def user_avatar_update(self, userid, payload):
        '''  '''
        response, status_code = self.__pod__.User.post_v1_admin_user_uid_avatar_update(
            sessionToken=self.__session,
            uid=userid,
            payload=payload
        ).result()
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
801773
function(event, state, member) {
        if (member.membership === "invite") {
            // We do NOT add invited members because people love to typo user IDs
            // which would then show up in these lists (!)
            return;
        }

        const user = this.users[member.userId] || new User(member.userId);
        if (member.name) {
            user.setDisplayName(member.name);
            if (member.events.member) {
                user.setRawDisplayName(
                    member.events.member.getDirectionalContent().displayname,
                );
            }
        }
        if (member.events.member && member.events.member.getContent().avatar_url) {
            user.setAvatarUrl(member.events.member.getContent().avatar_url);
        }
        this.users[user.userId] = user;
    }
1255027
def updated_by(self):
        
        if self.api and self.updated_by_id:
            return self.api._get_user(self.updated_by_id)
68209
async def update(self, fields=''):
    '''
    '''
    path = 'Users/{{UserId}}/Items/{}'.format(self.id)
    info = await self.connector.getJson(path,
                                        remote=False,
                                        Fields='Path,Overview,'+fields
    )
    self.object_dict.update(info)
    self.extras = {}
    return self
1121991
def modify(self, **params):
        """"""
        data = self.api_client.update_current_user(**params)
        self.update(data)
        return data
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,
        ]);
    }
159679
def user_update(self, username, data):
        
        url = 'rest/api/2/user?username={0}'.format(username)
        return self.put(url, data=data)
1308719
def custom_update_user(sender, instance, attributes, user_modified, **kargs):
    
    for k, v in attributes.items():
        u = set.intersection(set(v), set([u'true', u'false']))
        if u:
            setattr(instance, k, u.pop() == u'true')
    return True
1321397
def edituser(self, user_id, **kwargs):
        
        data = {}

        if kwargs:
            data.update(kwargs)

        request = requests.put(
            '{0}/{1}'.format(self.users_url, user_id),
            headers=self.headers, data=data, timeout=self.timeout, verify=self.verify_ssl, auth=self.auth)

        if request.status_code == 200:
            return request.json()
        else:
            return False
83274
function updateSigninStatus(isSignedIn) {

        if (isSignedIn) {
            //$("#signInButton").hide();

            var user = gapi.auth2.getAuthInstance().currentUser.get();
            var profile = user.getBasicProfile();
            var username = profile.getName();
            $("#switchUserLink").html("Logged in as: " + username);

        }

    }
259162
def change_id(self, new_id):
        """"""
        self._load_raw_content()
        self._id = new_id
        self.get_filename(renew=True)
        self.get_filepath(renew=True)
        return
84668
def change(self, inpt, hashfun=DEFAULT_HASHFUN):
        """"""
        self.img = self.__create_image(inpt, hashfun)
760137
def update_user_label(self):
        
        self._user_label = _uniqueid_to_uniquetwig(self._bundle, self.unique_label)
        self._set_curly_label()
1184431
def user_set_avatar(self, action=None, quick_key=None, url=None):
        
        return self.request("user/set_avatar", QueryParams({
            "action": action,
            "quick_key": quick_key,
            "url": url
        }))
949261
def update(self, photo, **kwds):
        
        result = self._client.post("/photo/%s/update.json" %
                                   self._extract_id(photo),
                                   **kwds)["result"]
        return Photo(self._client, result)
559577
def update_user(self):
        
        # First create a copy of the current user
        user_dict = self.serialize()
        # Then delete the entities in the description field
        del user_dict['description']['entities']
        # Then upload user_dict
        user, meta = self._api.update_user('me', data=user_dict)
629099
def update_guild_member(data)
      server_id = data['guild_id'].to_i
      server = self.server(server_id)

      member = server.member(data['user']['id'].to_i)
      member.update_roles(data['roles'])
      member.update_nick(data['nick'])
    end