// PATCH /api/org/users/:userId
189108
func UpdateOrgUserForCurrentOrg(c *m.ReqContext, cmd m.UpdateOrgUserCommand) Response {
	cmd.OrgId = c.OrgId
	cmd.UserId = c.ParamsInt64(":userId")
	return updateOrgUserHelper(cmd)
}
549737
func (info Info) GetUserByID(userID string) *User {
	for _, user := range info.Users {
		if user.ID == userID {
			return &user
		}
	}
	return nil
}
501288
func (i *DocumentIndex) UsersOrgs(userID influxdb.ID) ([]influxdb.ID, error) {
	f := influxdb.UserResourceMappingFilter{
		UserID:       userID,
		ResourceType: influxdb.OrgsResourceType,
	}

	ms, err := i.service.findUserResourceMappings(i.ctx, i.tx, f)
	if err != nil {
		return nil, err
	}

	ids := make([]influxdb.ID, 0, len(ms))
	for _, m := range ms {
		ids = append(ids, m.ResourceID)
	}

	return ids, nil
}
97970
func lookupUserid(id int) string {
	u, err := user.LookupId(strconv.Itoa(id))
	if err == nil {
		return u.Username
	}
	if _, ok := err.(user.UnknownUserIdError); ok {
		return ""
	}
	if parsedPasswd {
		return ""
	}
	parsedPasswd = true
	populateMap(uidName, nil, "/etc/passwd")
	return uidName[id]
}
97585
func (s *GetUserInput) SetUserId(v string) *GetUserInput {
	s.UserId = &v
	return s
}
406800
func (s *DisassociatePhoneNumberFromUserInput) SetUserId(v string) *DisassociatePhoneNumberFromUserInput {
	s.UserId = &v
	return s
}
999550
func (s *PostContentInput) SetUserId(v string) *PostContentInput {
	s.UserId = &v
	return s
}
1211028
func (s *UpdateUserHierarchyInput) SetUserId(v string) *UpdateUserHierarchyInput {
	s.UserId = &v
	return s
}
903171
func UpdateUser(c *m.ReqContext, cmd m.UpdateUserCommand) Response {
	cmd.UserId = c.ParamsInt64(":id")
	return handleUpdateUser(cmd)
}
1086266
func (s *AssociatePhoneNumberWithUserInput) SetUserId(v string) *AssociatePhoneNumberWithUserInput {
	s.UserId = &v
	return s
}
1121968
func (s *DescribeSessionsInput) SetUserId(v string) *DescribeSessionsInput {
	s.UserId = &v
	return s
}
776000
func (sl *Slack) UsersInfo(userId string) (*User, error) {
	uv := sl.urlValues()
	uv.Add("user", userId)

	body, err := sl.GetRequest(usersInfoApiEndpoint, uv)
	if err != nil {
		return nil, err
	}
	res := new(UsersInfoAPIResponse)
	err = json.Unmarshal(body, res)
	if err != nil {
		return nil, err
	}
	if !res.Ok {
		return nil, errors.New(res.Error)
	}
	return res.User, nil
}
1181873
func (c *users) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *user.User, err error) {
	result = &user.User{}
	err = c.client.Patch(pt).
		Resource("users").
		SubResource(subresources...).
		Name(name).
		Body(data).
		Do().
		Into(result)
	return
}
870737
func (s *DescribeUserOutput) SetUserId(v string) *DescribeUserOutput {
	s.UserId = &v
	return s
}
363152
func (s *userService) UpdateUsername(id int64, newUsername string) (datamodels.User, error) {
	return s.Update(id, datamodels.User{
		Username: newUsername,
	})
}
125619
func GetOwnedOrgsByUserID(userID int64) ([]*User, error) {
	sess := x.NewSession()
	return getOwnedOrgsByUserID(sess, userID)
}
1208560
func (c *Client) RemoveUserID(userID string, opts ...interface{}) (res RemoveUserIDRes, err error) {
	opts = opt.InsertExtraHeader(opts, "X-Algolia-User-ID", userID)
	err = c.transport.Request(&res, http.MethodDelete, "/1/clusters/mapping", nil, call.Write, opts...)
	return
}