How to remove the the username/password reset links on a Joomla site - JoomShaper

How to remove the the username/password reset links on a Joomla site

30 September 2015
Hits 24,151
2 min read
How to remove the the username/password reset links on a Joomla site

If you own or administer a website, may be there are several reasons to hide the backend as much as possible. The login form is necessary for any membership site. One might like to remove its “Forgot username” and “Forgot password” links from the login area. In this tutorial, I’ll show how to remove these two links from a Joomla site’s template.

Remember, this action involves template file editing. So, if you make any mistake that may have negative impact on your site. Create a duplicate copy of the template and take a full website backup before proceed, so that you can revert the changes if needed.

Step 1: Remove username/password reset links from User components

At first login to your site’s administration area. Go to Extensions > Templates.

psr2

It will show you all of the templates installed on your Joomla site. Click the Templates tab from the left and make sure the filter is set as Site. Now go to the template editor panel by clicking the active template’s title.

psr4

Go to Create overrides > Components > com_users > Login. Once you click the ‘Login’ link there, it will show a message “Override created in \templates\protostar\html\com_users\login”.

Now go to the Editor tab and expand html > com_users > login > default_login.php. It will open the file to edit.

Now we need to remove few codes that are responsible for username/password reset forms. Select the lines shown in the screenshot (Line 88-95). Delete them and press the green Save button.

Step 2: Remove username/password reset links from Login module

Again visit your site’s administration area. Go to Extensions > Templates. Click the Templates tab from the left while the filter is set as Site. Open the template editor panel by clicking the current template’s title. Go to Create overrides > Modules > mod_login. 

The system will show you a message “Override created in \templates\protostar\html\mod_login”.

Enter into the Editor tab. Go to html > mod_login > default.php

An editor box will open. Select and remove the lines from 105 to 112. See screenshot for better understanding. After deleting these codes, save changes with a click on the green Save button.

And it’s done.

Now there is no Username or Password recovery link in the login area.

Arafat Bin Sultan

Arafat Bin Sultan

Arafat is a tech-enthusiast with a keen interest in space, photography, and video making.

Comments (5)

A
Attila
This comment was minimized by the moderator on the site

Hello!

After I deleted the lines and saved, my site does not open and showing HTTP error 500.
I would be really thankful for help.

Attila

Arafat Bin Sultan
Arafat Bin Sultan    Attila
This comment was minimized by the moderator on the site

Hi Attila, did you take a backup or duplicated the template before editing? If yes, you can revert the change by simply replacing the 'mod_login' file by its version immediate before you edited the codes according to this tutorial. Or you can also restore the backup. Alternatively, you can access your server using Filezilla, and then replace the edited 'mod_login' file with a fresh one. Hope it helps.

A
Anthony
This comment was minimized by the moderator on the site

Hi, this does not seem to be working for me. I am using the Helix3 template. Has anything changed?

Paul Frankowski
Paul Frankowski    Anthony
This comment was minimized by the moderator on the site

Hi Anthony,
in Helix3 if we talk about login module(!) check that file:
templates\shaper_helix3\html\mod_login\default.php
edit inside lines 39-52
---
Alternative safe method to hide those two links is

#form-login-password {display:none !important;}

A
Anthony    Paul Frankowski
This comment was minimized by the moderator on the site

Thanks Paul, it is now working

There are no comments posted here yet

Sign up for our newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.