// GetUserFrontendID mocks base method
327709
func (m *MockBindingStorage) GetUserFrontendID(uid, frontendType string) (string, error) {
	ret := m.ctrl.Call(m, "GetUserFrontendID", uid, frontendType)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
196392
func (api *Client) GetUserIdentityContext(ctx context.Context) (*UserIdentityResponse, error) {
	values := url.Values{
		"token": {api.token},
	}
	response := &UserIdentityResponse{}

	err := api.postMethod(ctx, "users.identity", values, response)
	if err != nil {
		return nil, err
	}

	if err := response.Err(); err != nil {
		return nil, err
	}

	return response, nil
}
598763
func getUserIDv3(client *gophercloud.ProviderClient, options tokens3.AuthOptionsBuilder, eo gophercloud.EndpointOpts) (string, error) {
	// Override the generated service endpoint with the one returned by the version endpoint.
	v3Client, err := openstack.NewIdentityV3(client, eo)
	if err != nil {
		return "", err
	}

	// Issue new unscoped token
	result := tokens3.Create(v3Client, options)
	if result.Err != nil {
		return "", result.Err
	}

	user, err := result.ExtractUser()
	if err != nil {
		return "", err
	}

	return user.ID, nil
}
863892
func GetTokenUser(token syscall.Token) (User, error) {
	tokenUser, err := token.GetTokenUser()
	if err != nil {
		return User{}, errors.Wrap(err, "GetTokenUser failed")
	}

	var user User
	user.SID, err = tokenUser.User.Sid.String()
	if err != nil {
		return user, errors.Wrap(err, "ConvertSidToStringSid failed")
	}

	user.Account, user.Domain, user.Type, err = tokenUser.User.Sid.LookupAccount("")
	if err != nil {
		return user, errors.Wrap(err, "LookupAccountSid failed")
	}

	return user, nil
}
1141346
func (dl *DaemonLocal) GetIDForAssertion(assertion string) (
	keybase1.UserOrTeamID, bool) {
	dl.lock.Lock()
	defer dl.lock.Unlock()
	id, ok := dl.asserts[assertion]
	return id, ok
}
418906
func (c *CloudPersister) GetUser(id int64) (*models.User, error) {
	ctx := context.Background()
	k := datastore.NewKey(ctx, "User", "", id, nil)
	User := &models.User{}
	if err := c.DatastoreClient().Get(ctx, k, User); err != nil {
		return nil, fmt.Errorf("datastoredb: could not get User: %v", err)
	}
	User.ID = id
	return User, nil
}
553153
func (api *API) GetUser(user_id string) (*User, error) {
	result := new(User)
	url := createUrl(api, userPathSegment, user_id)
	err := api.Client.Get(url, &result, http.StatusOK)
	if err != nil {
		return nil, err
	}
	result.api = api
	return result, nil
}
315618
func (v *Service) GetParentID() (o ServiceID) {
	if v != nil && v.ParentID != nil {
		return *v.ParentID
	}

	return
}
331820
func (s *IdentityService) GetUsers() ([]services.User, error) {
	startKey := backend.Key(webPrefix, usersPrefix)
	result, err := s.GetRange(context.TODO(), startKey, backend.RangeEnd(startKey), backend.NoLimit)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var out []services.User
	for _, item := range result.Items {
		if !bytes.HasSuffix(item.Key, []byte(paramsPrefix)) {
			continue
		}
		u, err := services.GetUserMarshaler().UnmarshalUser(
			item.Value, services.WithResourceID(item.ID), services.WithExpires(item.Expires))
		if err != nil {
			return nil, trace.Wrap(err)
		}
		out = append(out, u)
	}
	return out, nil
}
70820
func (endpoint *ApplicationEndpoint) GetID() string {
	return strings.ToLower(fmt.Sprintf("%s/%d %s %s", endpoint.ServiceID, endpoint.InstanceID, endpoint.Purpose, endpoint.Application))
}
737177
func (api *Client) GetUserProfile(userID string, includeLabels bool) (*UserProfile, error) {
	return api.GetUserProfileContext(context.Background(), userID, includeLabels)
}
1044023
func (self *OpenIdProvider) GetAuthenticatedUser(w http.ResponseWriter, r *http.Request) (User, Token, error) {

	// Parse the url parameters
	params := r.URL.Query()

	// Check to see if the user successfully authenticated
	if params.Get("openid.mode") == "cancel" {
		return nil, nil, ErrAuthDeclined
	}

	// Get the user details from the URL parameters
	lastName := params.Get("openid.ext1.value.lastname")
	firstName := params.Get("openid.ext1.value.firstname")
	fullName := fmt.Sprintf("%s %s", firstName, lastName)
	email := params.Get("openid.ext1.value.email")

	// Return the User data
	// TODO for now we are re-using the Google User
	user := user{id: email, email: email, name: fullName, provider: self.endpoint }
	return &user, nil, nil
}
854482
func ServiceIDFromUID(uid string) string {
	found := 0
	i := len(uid) - 1
	for ; i >= 0; i-- {
		if uid[i] == '-' {
			found++
		}
		// Terminate after the date component is found, e.g. es-2017-11-11
		if found == 3 {
			break
		}
	}

	return uid[0:i]
}
989304
func (s *service) RetrieveUserInfoByUserId(userId uint) (resDTO rest.ResponseDTOUserInfo, error *servicehelper.Error) {
	entity, err := s.repo.FindByID(userId)
	if err != nil {
		return rest.ResponseDTOUserInfo{}, &servicehelper.Error{Detail: errors.New("no result found"), Code: servicehelper.NotFound}
	}
	return rest.ResponseDTOUserInfo{
		UserId: entity.ID,
		Email:  entity.Email,
	}, nil
}
190279
func (e *Enforcer) GetUsersForRoleInDomain(name string, domain string) []string {
	res, _ := e.model["g"]["g"].RM.GetUsers(name, domain)
	return res
}
681543
func (client *Client) GetUserRichMenu(userID string) *GetUserRichMenuCall {
	return &GetUserRichMenuCall{
		c:      client,
		userID: userID,
	}
}
467808
func (s *IdentityService) GetUserByOIDCIdentity(id services.ExternalIdentity) (services.User, error) {
	users, err := s.GetUsers()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	for _, u := range users {
		for _, uid := range u.GetOIDCIdentities() {
			if uid.Equals(&id) {
				return u, nil
			}
		}
	}
	return nil, trace.NotFound("user with identity %q not found", &id)
}