Remove login form from restricted pages

Permalink
I have a few pages on a site that are restricted to authorize users. I want to remove the login form from these pages. Ideally, I would redirect the user to a 404 page or just display an error message. However, I can't find any way to do this. Does anyone know where I can change this?

ScottSandbakken
 
Steevb replied on at Permalink Reply
Steevb
Is login hardcoded?

Which theme are you using?

URL?
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
I just have some pages restricted with standard permissions. The login form appears on these pages if you are not logged in. This is the default functionality with any theme. I just need to change it so that guest visitors on not given a login screen.

The theme is a custom theme I developed, but I didn't add nor alter anything that would effect this behavior.
Steevb replied on at Permalink Reply
Steevb
Can you not just hide restricted pages and login block from guests?
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
The client is trying to pass PCI compliance. Part of the scan looks for unsecured login pages. Rather than putting every restricted page behind the SSL, I just want to stop the login form from displaying on restricted pages.
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
Figured it out. I was looking at the page_forbidden.php controller and found a reference to the FORBIDDEN_SHOW_LOGIN constant, so I added the line below to the site.php file and all the login forms went away.

define('FORBIDDEN_SHOW_LOGIN',false);