Update an existing user

Output:

    a dictionary containing user information
973117
def cli(ctx, email, first_name, last_name, password, metadata={}):
    
    return ctx.gi.users.update_user(email, first_name, last_name, password, metadata=metadata)
696879
def cmd_update(args):
    
    #args.output = None

    markov = load(MarkovText, args.state, args)
    read(args.input, markov, args.progress)
    if args.output is None:
        if args.type == SQLITE:
            save(markov, None, args)
        elif args.type == JSON:
            name, ext = path.splitext(args.state)
            tmp = name + '.tmp' + ext
            save(markov, tmp, args)
            replace(tmp, args.state)
    else:
        save(markov, args.output, args)
1233426
def _update_dict(self, dict_):
        '''
        
        '''
        dict_ = dict((k, v) for k, v in dict_.items() if (
                    k not in self._init_attrs))

        # zzz
        if 'no_gpg' in dict_ and dict_['no_gpg']:
            dict_['gpg'] = False

        unknown_opts = set(dict_.keys()).difference(set(DEFAULT_OPTS.keys()))
        if unknown_opts and self._print_errors:
            # only print error once
            sys.stdout.write(
                'WARNING: Unknown options: ' +
                ', '.join(list(unknown_opts)) + '\n')
            if 'no_schedule' in unknown_opts:
                sys.stdout.write('WARNING: Config option `no_schedule` has '
                                 'been deprecated. To disable automatic '
                                 'scheduling for Red Hat Insights, run '
                                 '`insights-client --disable-schedule`\n')
        for u in unknown_opts:
            dict_.pop(u, None)
        self.__dict__.update(dict_)
899734
def update_identity(self):
        """"""

        fr = self.record

        d = fr.unpacked_contents

        d['identity'] = self._dataset.identity.ident_dict
        d['names'] = self._dataset.identity.names_dict

        fr.update_contents(msgpack.packb(d), 'application/msgpack')
323031
def getent(refresh=False):
    '''
    
    '''
    if 'user.getent' in __context__ and not refresh:
        return __context__['user.getent']

    ret = []
    for data in pwd.getpwall():
        ret.append(info(data.pw_name))
    __context__['user.getent'] = ret
    return ret
21022
def update(self, uid):
        '''
        
        '''
        if self.userinfo.role[1] >= '3':
            pass
        else:
            return False
        post_data = self.get_post_data()

        post_data['user_name'] = self.get_current_user()

        if self.is_p:
            if MLink.update(uid, post_data):
                output = {
                    'addinfo ': 1,
                }
            else:
                output = {
                    'addinfo ': 0,
                }
            return json.dump(output, self)
        else:
            if MLink.update(uid, post_data):
                self.redirect('/link/list')
593676
def write_user(user):
    

    udata = {}

    for f in USER_FIELDS:
        udata[f] = getattr(user, f)

    for p in PERMISSIONS:
        udata[p] = '1' if getattr(user, p) else '0'
    db.hmset('user:{0}'.format(user.uid), udata)
965955
def user_info(self, kv):
        """"""

        key, value = kv
        self.__user_info[key] = value
352097
def refresh(self):
        
        newuser = self.bugzilla.getuser(self.email)
        self.__dict__.update(newuser.__dict__)
524102
def update(xCqNck7t, **kwargs):
        """"""
        def dict_list_val(inlist):
            l = []
            for i in inlist:
                if type(i)==dict:
                    l.append(Dict(**i))
                elif type(i)==list:
                    l.append(make_list(i))
                elif type(i)==bytes:
                    l.append(i.decode('UTF-8'))
                else:
                    l.append(i)
            return l
        for k in list(kwargs.keys()):
            if type(kwargs[k])==dict:
                xCqNck7t[k] = Dict(**kwargs[k])
            elif type(kwargs[k])==list:
                xCqNck7t[k] = dict_list_val(kwargs[k])
            else:
                xCqNck7t[k] = kwargs[k]
836870
def copy_and_update(dictionary, update):
    """"""
    newdict = dictionary.copy()
    newdict.update(update)
    return newdict
296583
function updateUserDataField(userId, data, overwrite, callback) {
        return _updateUserObjectField(userId, ['data'], data, overwrite)
            .then(function (userData) {
                return userData.data;
            })
            .nodeify(callback);
    }
1318207
def set_session_info(self, info):
        '''
        
        '''
        if not self.info:
            self.info = SessionInfo()
            info_d = self.info.as_dict()
            ks = []
            vs = []
            for k, v in info_d.items():
                ks.append(k)
                vs.append(v)
            self.insert(ks, vs)
        changed = self.info.copy(info)
        if changed:
            self.update(self.info.as_dict())
486967
def users_update_many(self, data, external_ids=None, ids=None, **kwargs):
        ""
        api_path = "/api/v2/users/update_many.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if external_ids:
            api_query.update({
                "external_ids": external_ids,
            })
        if ids:
            api_query.update({
                "ids": ids,
            })
        return self.call(api_path, query=api_query, method="PUT", data=data, **kwargs)
524592
def update_user(id, user, opts = {})
      data, _status_code, _headers = update_user_with_http_info(id, user, opts)
      return data
    end
567800
def update(self, dictionary):
        """"""
        allowed_attrs = list(self.__attributes__.keys())
        allowed_attrs += [a.alias for a in self.__attributes__.values()]
        for k in dictionary:
            # We only update existing attributes
            if k in allowed_attrs:
                setattr(self, k, dictionary[k])
        return self
474629
def update_dict(self,*args, **kwargs):
        
        super(Dict, self).update(*args, **kwargs)