plone/plone.app.users — pull request #5 by mauritsvanrees (2012-11-09 19:18:37+00:00)
Title: Change user id generation, making it pluggable

This refs http://dev.plone.org/ticket/11616 which complains that not all valid email addresses are accepted as login name. This pull request does not really change that, but takes a different approach, changing the way user ids are chosen.

- For the normal case (no email login), nothing changes.

- When using email as login, we no longer take the email address as user id, but we generate a user id based on the full name, for example bob-jones-2. This means the user id differs from the login name, but that is no problem.

- We allow to choose a different user id generation scheme by registering an IUserIdGenerator utility. No utility is registered by default. Simple examples are included in the tests.