func (k *KeyringSectionV2) FindMember(id *identity.ID) (*primitive.KeyringMember, *primitive.MEKShare, error) {
	var krm *primitive.KeyringMember
	var mekshare *primitive.MEKShare
	for _, m := range k.Members {
		mbody := m.Member.Body.(*primitive.KeyringMember)
		if *mbody.OwnerID == *id {
			krm = mbody
			mekshare = m.MEKShare.Body.(*primitive.MEKShare)
			break
		}
	}

	if krm == nil {
		return nil, nil, ErrMemberNotFound
	}

	return krm, mekshare, nil
}
// FindMember returns the membership and mekshare for the given user id.
FindMember returns the membership and mekshare for the given user id.
// FindMember returns the membership and mekshare for the given user id .
func (k *KeyringSectionV2) FindMember(id *identity.ID) (*primitive.KeyringMember, *primitive.MEKShare, error) {
	var krm *primitive.KeyringMember
	var mekshare *primitive.MEKShare
	for _, m := range k.Members {
		mbody := m.Member.Body.(*primitive.KeyringMember)
		if *mbody.OwnerID == *id {
			krm = mbody
			mekshare = m.MEKShare.Body.(*primitive.MEKShare)
			break
		}
	}
	if krm == nil {
		return nil, nil, ErrMemberNotFound
	}
	return krm, mekshare, nil
}
func ( k * KeyringSectionV2 ) FindMember ( id * identity . ID ) ( * primitive . KeyringMember , * primitive . MEKShare , error ) { var krm * primitive . KeyringMember var mekshare * primitive . MEKShare for _ , m := range k . Members { mbody := m . Member . Body . ( * primitive . KeyringMember ) if * mbody . OwnerID == * id { krm = mbody mekshare = m . MEKShare . Body . ( * primitive . MEKShare ) break } } if krm == nil { return nil , nil , ErrMemberNotFound } return krm , mekshare , nil }
FindMember returns the membership and mekshare for the given user id.
FindMember returns the membership and mekshare for the given user id .