SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict The Mog's Avatar
    Join Date
    Dec 2002
    Location
    Manchester UK
    Posts
    310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Suggest Username

    heres a quick Brain teaser..


    Lets say a user registers on my site with the username "kenny" ,

    and another user also tries to register with the username "kenny",

    how would i Suggest an alternative username??
    lets say the users name is "Kenny France";
    ie:

    kenny1
    francekenny
    kennyfrance

    etc

    Cheers
    K-

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just create a random number of X length and add that to the username they chose and see if it's available

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    North Wales, UK
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Suggest Username

    how would i Suggest an alternative username??
    lets say the users name is "Kenny France";
    ie:

    kenny1
    francekenny
    kennyfrance
    You've answered your own question. Assuming their original username wasn't already in this format, you try adding their surname onto the end, switching them round and adding numbers onto the username. For each one you check whether it is already taken, and if not, you display it as an option.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •