Remove Request New Password

+1
-2
-1

Hi,
I am learning drupal and I want to remove Request New Password from user login page and if user direct enters http://example.com/user/password in url then also it will not show

i have used the following code by adding new module also

function MODULE_menu_alter(&$items) {
//condition to check the user
global $user;
if($user->id == '') { //can use $user->name as well
$items['user/password']['access callback'] = FALSE;
}
}

but its not working

+1
+5
-1

Hi Alok,

Unfortunately, we don't suppose to answer questions related to custom request. However, I recommend you have a look at this module "No request new password"