Skip to content

Fix user.create() to respect use_uuid_as_userid#600

Open
jensens wants to merge 1 commit intomainfrom
plip-4292-fix-user-creation
Open

Fix user.create() to respect use_uuid_as_userid#600
jensens wants to merge 1 commit intomainfrom
plip-4292-fix-user-creation

Conversation

@jensens
Copy link
Member

@jensens jensens commented Mar 17, 2026

Part of PLIP 4292.

  • Use generate_user_id()/generate_login_name() from plone.app.users.utils
  • Respects use_uuid_as_userid, use_email_as_login, IUserIdGenerator, ILoginNameGenerator
  • Separates user_id from login_name, calls pas.updateLoginName() when they differ
  • Returns get(userid=user_id) instead of get(username=user_id) (UUID-compatible)
  • Adds plone.app.users as explicit dependency

Depends on: plone/plone.app.users#147 - tests here red until this one was merged.


📚 Documentation preview 📚: https://ploneapi--600.org.readthedocs.build/

Use generate_user_id/generate_login_name from plone.app.users.utils
instead of hardcoded user_id logic. This respects use_uuid_as_userid,
use_email_as_login, and custom IUserIdGenerator/ILoginNameGenerator
utilities.

Part of PLIP 4292.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mister-roboto
Copy link

@jensens thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants