Hi Gabriel,
thank you for that advice. In fact I have discovered, that it will be easier to manage: All the users of the LDP-authentication use the following username:
firstname.lastname@example.com
There are no currently no users with a username containing @example.com. So the challenge will be to prevent manual accounts and e-mail based self registration accounts to use @example.com in their usernames. This guarantees unique usernames.
I just have to look, if we modify the moodle core a little bit or if the validation of newly created usernames can be overriden via a local plugin.
Kind regards,
David