[Zope-CMF] RE: Help- cmf version problem

David (Hamish) Harvey david.harvey@bristol.ac.uk
Fri, 07 Jun 2002 08:50:04 +0100


--On Thursday, June 06, 2002 16:36:23 -0700 "Kelley, Sean" 
<SKelley@ci.santa-rosa.ca.us> wrote:

> PS- to the original message- I meant the join form NOT the log in form-
>
> I just discovered the reason that the join_form does not work with version
> 1.3
>
> I am not allowed to enter spaces like FirstName LastName with v 1.3 but I
> am with v 1.2
> I really need to be able to add spaces because when one lists out the
> members with the roster etc., they need the spaces between first and last.

This is in the username? I came across these restrictions recently:

http://lists.zope.org/pipermail/zope-cmf/2002-June/012956.html

and found that all of the restrictions on user names are defined in 
CMFCore/RegistrationTool.py - there is a line like

    __ALLOWED_MEMBER_ID_PATTERN = re.compile( "^[A-Za-z][A-Za-z0-9_]*$" )

I've modified it to

    __ALLOWED_MEMBER_ID_PATTERN = re.compile( "^[A-Za-z][A-Za-z0-9_\.\-]*$" 
)

which allows . and - as characters in the username. I haven't worked out 
how to override this without modiying the source code in CMFCore yet, 
though.

    __ALLOWED_MEMBER_ID_PATTERN = re.compile( "^[A-Za-z][A-Za-z0-9_\.\-\ 
]*$" )

should enable spaces too (untested). I didn't enable spaces - despite 
requests from users - because of the URI issues noted in the above 
referenced email.

Cheers,
Hamish