Login block: removing "Forgot Password" link

Login block: removing "Forgot Password" link

by Lauren Panton -
Number of replies: 4
I would like to remove the "Forgot Password" link from the login box and needs some advice on how to do this. We are using Active Directory to authentic, so we don't want this option available to users.

Thanks for your help,
Average of ratings: -
In reply to Lauren Panton

Re: Login block: removing "Forgot Password" link

by Ken Gibson -

First:

in your moodle install head to:

 /blocks/login/block_login.php

open up the block_login.php in any html editor and delete the following line

  $forgot = $wwwroot . '/login/forgot_password.php';  (around line 37).

save and reupload to the server. This kills the link "Forgot password".

Next:

in your moodle install head to:

/login/

and delete the forgot_password.php file - this is the file that the link above points to.

Ken

In reply to Ken Gibson

Re: Login block: removing "Forgot Password" link

by Lauren Panton -
This is just what I needed to know - thanks so much!
In reply to Lauren Panton

Re: Login block: removing "Forgot Password" link

by Matt Campbell -
We've got a custom theme we use on our sites, so I just added a bit of css to our theme:

.loginbox .loginpanel .subcontent.forgotsub {
 display:none;
 }
.block_login .content .footer {
 display:none;
 }

This hides the forgot password link also, and then you don't have to worry about it showing back up the next time you upgrade your site, as you would do if you modified code.

Thanks,
Matt
In reply to Matt Campbell

Re: Login block: removing "Forgot Password" link

by Sohail Farooqi -

This is ver nice, but please tell me in which file should I put this code.