Auth check

Permalink
Where can I find the class that checks if a user is authorized to view a page. And if not, gets redirected to the login page ?

 
12345j replied on at Permalink Reply
12345j
$p = new Permissions($page);
if(!$p->canRead()){
Header("location: ".BASE_URL.view::url('/login'));
}

but this should happen automatically.
nielsb85 replied on at Permalink Reply
It is happening automatically, that is not the problem.

But I need to find the file where this is happening because I want to change the redirect location after wrong attempt:)
12345j replied on at Permalink Reply
12345j
thats going to be in root/concrete/controller/login.php, copy to root/controllers/login.php and below lines 162 and 153 add the line
Header("location: ".BASE_URL.view::url('/login_failed'));

where login_failed is the handle of the page you want them to go to.
nielsb85 replied on at Permalink Reply
Thats also not the place. It doesnt do a header location to login. It stays on the same url but instead of showing the page, it shows a login screen but the url stays the same.