Is there any Drupal module which checks the username in the database, if its present then it should display some suggestions to be selected just like the yahoo or gmail gives on registration?
2 Answers
There is no module that does that. The closest you will find is the one that just checks if the username is available while registering. An example of such module is username check. To achieve the username suggestion bit, you may have to write a custom module for that.
This very simple module allows visitors to check username originality quickly using AJAX request during registration (completing registration form). This makes registration process more convenient as you don't need to submit your registration form to find out whether this username is already taken or not. This module is sensible to standard Drupal username validation as well as Access Rules validation.
Friendly Register module allows users to see if a username or email address has already been used during registration before they submit the form. This module checks the database and returns an error if the username is already in use. In addition to checking the username the module checks if there is already an account using that email address, if there is, a message is displayed with links to the login or reset password pages.
-
-
Well you would have to implement the hook_form_alter() to alter the user_register_form, with javascript check the username is available (e.g. ben). If it is not available, write a function that appends some certain kind of words (like 1001) to the currently tested username (e.g ben) and it becomes (ben1001) check if is available again in the database again and create about four different suggestions. present it to the user with a radio button saying choose one of this username and if he selects one, fill the username field with the selected username.– 4lifeCommented Jun 28, 2013 at 11:07
If your searching a module that "checks the username in the database", I propose you to look at /modules/user. In 'user.module'.
-
Can you expand a little how the core user module does this?– mpdonadio ♦Commented Jun 28, 2013 at 11:03