You can use the below code remove the password hint details in drupal register page.
/**
* Implements hook_element_info_alter().
*/
function HOOK_element_info_alter(&$types) {
if (isset($types['password_confirm']['#process']) && (($position = array_search('user_form_process_password_confirm', $types['password_confirm']['#process'])) !== FALSE)) {
unset($types['password_confirm']['#process'][$position]);
}
}
Note: Please clear form cache after adding
Web Development Information [PHP, DRUPAL, MYSQL, MAGENTO, JQUERY, JAVASCRIPT, CSS, HTML5]
Tuesday, March 1, 2016
Remove the user tab link in user login page and user register page
We can use the below code to remove the user tab link in user login page and user register page.
/**
* Implementation of hook_menu_alter().
*/
function HOOK_menu_alter(&$items) {
$items['user/login']['type'] = MENU_CALLBACK;
$items['user/register']['type'] = MENU_CALLBACK;
$items['user/password']['type'] = MENU_CALLBACK;
}
Note: Please clear the menu cache after adding this function
/**
* Implementation of hook_menu_alter().
*/
function HOOK_menu_alter(&$items) {
$items['user/login']['type'] = MENU_CALLBACK;
$items['user/register']['type'] = MENU_CALLBACK;
$items['user/password']['type'] = MENU_CALLBACK;
}
Note: Please clear the menu cache after adding this function
Subscribe to:
Posts (Atom)