Skip to content

Instantly share code, notes, and snippets.

@martinmev
Last active January 1, 2016 18:59
Show Gist options
  • Save martinmev/8187860 to your computer and use it in GitHub Desktop.
Save martinmev/8187860 to your computer and use it in GitHub Desktop.
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