[Zope-CMF] just what is a valid username?

Tres Seaver tseaver@zope.com
05 Jun 2002 08:54:47 -0400


On Wed, 2002-06-05 at 07:56, David (Hamish) Harvey wrote:
> I've just discovered that the CMF registration tool (and this the CMF and 
> thus Plone) seems to reject a range of usernames which the acl_users folder 
> is happy with. Further, if you add these names manually, you can log into 
> the site using them. Names with spaces in them are an example, and there 
> are a few good reasons for not allowing these. Names with . in them are 
> also blocked (although once the registration mechanism is bypassed they 
> seem to work fine) and I have a lot of (potential) users wanting to use 
> part of their email address as an easy to remember user name.
> 
> Can anyone tell me how deep the restriction on usernames goes in Zope/CMF? 
> If I change the code which tests for valid names at registration times and 
> loosen the restrictions, will I hit problems later?

Not really (but it depends).  The 'portal_registration' tool is
responsible for enforcingthe site's policies on allowable user IDs;  the
canonical way to change the policy is to replace that tool with one
which knows your policy.

If you allow user IDs to contain charachters which aren't legal in URIs,
then some users' member areas will have to be escaped;  you might need
to customize skins for this, as the current ones may assume that user
IDs are "URI-safe".

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com