Suggesting available username

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jaunty Edward

    Suggesting available username

    Hi,
    I have to show some of the posible usernames available when a user can
    not get a perticular username in a very normal member registration
    form.

    I will be thankful if anyone can show me a way to this.

    Thanks,
    Jaunty Edward
  • Gordon Burditt

    #2
    Re: Suggesting available username

    >I have to show some of the posible usernames available when a user can[color=blue]
    >not get a perticular username in a very normal member registration
    >form.
    >
    >I will be thankful if anyone can show me a way to this.[/color]

    1. Make up some similar user names to what the user asked for.
    2. Check these against the list of taken user names, eliminating
    the ones already taken.
    3. Present the list to the user.

    Some similar user names include:

    - append a digit to what the user asked for.
    - change one letter in what the user asked for
    - change a substring that corresponds to a name to a similar name
    e.g. CharlesH -> CharlieH. This requires a known list of similar
    names to make it work.
    - Possibly try a combination of several of the above.

    You do have to make sure your suggestions don't run over the length
    limit for a user name, that they contain only legal characters, and
    possibly screen your suggestions for swear words.

    Gordon L. Burditt

    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: Suggesting available username

      smilesinblues@h otpop.com (Jaunty Edward) wrote in message news:<1ec8978e. 0411252301.5384 a0ad@posting.go ogle.com>...[color=blue]
      > Hi,
      > I have to show some of the posible usernames available when a user can
      > not get a perticular username in a very normal member registration
      > form.[/color]

      1. make the username field UNIQUE.
      2. Insert the new username in the table.
      a. if no duplicate error, then no problem. Continue the
      procedure.
      b. if there is duplicate error, fetch similar usernames from the
      table. "SELECT username FROM user_info WHERE username='$newu sername'".
      Now you have array of similar usernames.
      c. Call GenUsernames() function which appends user's DOB, DOJ,
      etc but excludes the names in similar usernames list. Done.

      --
      <?php echo 'Just another PHP saint'; ?>
      Email: rrjanbiah-at-Y!com

      Comment

      Working...