[Zope-CMF] Re: returning case insensitive matches for portal_membership.searchMembers()

Norbert Marrale norbert at vsmpro.com
Thu Aug 3 15:22:42 EDT 2006


Dieter Maurer wrote:
> Norbert Marrale wrote at 2006-8-2 17:20 -0400:
>> Is there a less expensive way to return case insensitive results when 
>> querying portal_membership? (Zope 2.7.5-final / CMF 1.5.5)
> 
> The easiest way is to already store the member names lowercase normalized...
> 
> 
> 
Hi Dieter,

Member names are indeed all in lower case (thankfully).

Dealing with about 16000 members, most of which are not very 
sophisticated... They forget their registration handles, and send emails 
to the webmaster for help :(

Upon their initial registration, many users entered their email address 
in upper or mixed case. The email > username(s) lookup is meant to 
alleviate the number of support requests, allowing members to receive 
password reminders even if they forget their registration handles.

context.portal_membership.searchMembers('email','') pulls all email 
records and puts quite a bit of load on the server, I'm looking for 
ideas on how to make this lighter.

Would consider normalizing my existing data, but don't know where to 
start. Maybe looking in the wrong direction? Any pointers are appreciated!

Norbert






More information about the Zope-CMF mailing list