Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl Monk, Perl Meditation
 
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 having an uproarious good time at the Monastery: (9)
As of 2014-04-23 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (548 votes), past polls