Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Autogenerating usernames

by strat (Canon)
on Sep 03, 2006 at 10:36 UTC ( #570921=note: print w/ replies, xml ) Need Help??


in reply to Autogenerating usernames

If you need the usernames for the open internet, just set up a simple rule (e.g. /^\w{2,12}$/) and let the user choose what he wants.

But if you need usernames for a company, I'd use a rather strict rule. What this role looks like depends on the system, e.g.

  • length between 8 and 20 chars
  • first 4 chars are the department
  • next chars are the surname in international spelling [A-Za-z], with a maximum of 12 chars
  • first char of the givenname in international spelling

If this is not unique, add more letters of the givenname, and if still not unique, add something like [a-z]

So my username for a company could look like 1234fabianim or 1234fabianima or 1234fabianimartinx (if there are a lot of persons with the name martin fabiani in the same department)

The advantage of this rule is that these usernames are rather easy to remember

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"


Comment on Re: Autogenerating usernames
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://570921]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2015-07-04 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls