Remove Request New Password


I am learning drupal and I want to remove Request New Password from user login page and if user direct enters 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


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"