How to create a custom login functionality in Drupal 6

Sometimes it is very much necessary that we override the existing login functionality of Drupal and write our own custom login validations. This can usually be done using the form_alter hook. In my case I wanted to check whether the user enters a particular username and password and direct him to the necessary page based on the password that he enters.

Be sure to check what is the name of your login form. In my case it was user_login_form. You can save the code below as testmod.module and be sure to create an .info file for the same.

Comments
Related Searches second level domain dns queries drafting design split method regular expression case company

©2011 About.com. All rights reserved.

A part of The New York Times Company.