Based on this guide http://thefaultandfracture.blogspot.com/2009/04/theming-drupal-user-logi... I am trying to make a custom login form with a custom validation function.
The problem is, that my custom validation function never get's triggered. In fact it seems the default login_final_validate() function still get's triggered even though I have not added it from "form['#validate']"..
How can I override the default login validation. I have searched around for answers, but didn't find a solution that matches my needs.. I'm not experienced with drupal, but it seems it should be possible to do this..
Hope you can help me..
Best regards
Ole
Here's my code..
function get_user_login_form() {
$form_id = 'user_login';
$form = array();
$form['name'] = array(
'#type' => 'textfield',
'#maxlength' => USERNAME_MAX_LENGTH,
'#required' => TRUE,
'#attributes' => array('tabindex' => '11'),
);
$form['pass'] = array(
'#type' => 'password',
'#required' => TRUE,
'#attributes' => array('tabindex' => '12'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Log in'),
'#weight' => 2,
'#attributes' => array('tabindex' => '13')
);
//changed next line