Logo Search packages:      
Sourcecode: zope-cmfmember version File versions  Download package

def CMFMember::tools::memberdatacontainer::MemberDataContainer::searchMemberDataContents (   self,
  search_param,
  search_term 
)

Search members

Definition at line 332 of file memberdatacontainer.py.

00332                                                                    :
        """
        Search members
        """

        results=[]
        if search_param == 'username':
            search_param = 'getId'

        catalog=getToolByName(self, search_catalog)
        indexes=catalog.indexes()
        query={}

        if search_param in indexes:
            query[search_param] = search_term

        if query:
            query['portal_type'] = allowed_content_types
            results=catalog(query)

        return [{'username':getattr(r,'id'),'email':getattr(r,'email')} \
                for r in [r.getObject() for r in results] if hasattr(r,'id')]


    def searchForMembers( self, REQUEST=None, **kw ):


Generated by  Doxygen 1.6.0   Back to index