Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Drupal 6: this tiny module disables 'Request new password' functionality
; $Id$
name = Disable Request new password
description = Disable 'Request new password' functionality
core = 6.x
package = "Other"
version = "6.x-0.1"
<?php
// $Id$
/**
* Install the test_module module, including it's content (node)
* type.
* @file
*/
/**
* Implementation of hook_install()
*/
function disable_request_new_password_install() {
}
/**
* Implementation of hook_uninstall()
*/
function disable_request_new_password_uninstall() {
}
?>
<?php
function disable_request_new_password_menu_alter(&$items) {
// Drupal 7 $items['user/password']['access callback'] = FALSE;
// Drupal 7 $items['user/reset/%/%/%']['access callback'] = FALSE;
unset($items['user/password']);
unset($items['user/reset/%/%/%']);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment