Univention Bugzilla – Bug 54172
Make username/email generation code (UsernameHandler) available outside of import
Last modified: 2021-12-10 14:34:25 CET
The module ucsschool.importer.utils.username_handler contains classes for generating unique emails and usernames from schemas. The code is useful in scripts and hooks, but difficult to use, as it requires an initialized import. Refactor the module so that it becomes a part of the ucs-school-lib, having as few dependencies as possible, and replace it in the import with a backwards compatible wrapper.
Reference implementation: https://git.knut.univention.de/univention/components/ucsschool-hooks/-/blob/4.4/schoollib_hooks/generate_username.py
plan.io-Ticket: https://univention.plan.io/issues/32849