I was looking for the best practice, but I did not find it. I couldnโt even find a solution that I need to use by someone else.
I need to generate the username of the user based on its other data (first and last name), adding an integer at the end if necessary, until I get a unique username.
I prefer to do this in the model. Is there a standard way to do this? Or is it fit only in uniform? I studied overloading various model methods User, as well as signals, and did not find a suitable place to add it.
source
share