Hi All,

Am facing problem to override the predefined Drupal module by my custom module.

Have created "Registration" module but once I try to replace the "Create New account" link via my custom module, it will not redirect and am not able to access my module.

Please help me out to explain it using the code that where I am doing mistake on it. Please find my code in below

<?php
/*This is the main file, where you can create your registration page
* You need to define the hooks
*/

define('VIK_REG_MODULE_PATH', 'user/vikreg');

function vikas_reg_module_menu() {
$items = array();

$items[VIK_REG_MODULE_PATH] = array(
'title' => 'Vikas Reg Module',
'description' => 'Backup/restore your database and files or migrate data to or from another Drupal site.',
'page callback' => 'drupal_get_form',
'page arguments' => array('vikas_reg_module_form'),
'access callback' => 'vikas_reg_module_access',
/*'type' => MENU_NORMAL_ITEM,*/
'type' => MENU_LOCAL_TASK,
);
return $items;
}

function vikas_reg_module_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'user-login-form') {
$form['#redirect']=VIK_REG_MODULE_PATH;
}
}