Last active
January 1, 2016 18:59
-
-
Save martinmev/8187860 to your computer and use it in GitHub Desktop.
Drupal 6: this tiny module disables 'Request new password' functionality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; $Id$ | |
name = Disable Request new password | |
description = Disable 'Request new password' functionality | |
core = 6.x | |
package = "Other" | |
version = "6.x-0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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() { | |
} | |
?> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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