If you have a Joomla website and there is providing a login form for your users maybe there are several reasons to hide or remove links “Forgot username” and “Forgot password” from the login form. In this tutorial, I’ll show how to remove forgot username and forgot password links in Joomla.
Remove Joomla Forgot Username and Forgot Password Links
There are two login forms where you can see these 2 links forgot username and forgot password. The first one is the user component and the second is the login module.
Step1: Remove the links from the user component
- Login to administrator >Dashboard
- Go to System > Site Templates
- Now you will see the all installed templates. In the below screenshot is the default Joomla 4, So there is only one template Cassiopeia.
- Now Click on Create Overrides tab as below screenshot.
- Now click on user component com_users
- Go > com_users > login view(layout) and click on it.
- Created successfully override.
- Click on the editor tab Go > HTML > com_users > login view(layout)
- There are 3 files in the overrides folder as below
- We have to select one file defualt_login.php and click on it
- Comment HTML code as in below screenshot and save and close
- Now you can reload the page of the front-end site and check. Both links have been removed.
Step2: Remove the links from the login module
- Login to administrator >Dashboard
- Go to System > Site Templates
- Click on the template which is selected as default.
- Now click on the Create Overrides tab same as the above steps.
- Click on the left side module mod_login to create an override
- Go to the Editor tab and click on HTML > mod_login > default.php
- Edit the default.php file and comment on the code as below screenshot
- Now check front end login module
So now you can see we have removed forgot username and forgot password links in the Joomla user component and login module.
Let See: