I'm trying to set up two areas that require authentication, using Community Auth. One will be for front-end users, one for CMS users. I'm getting a bit confused about the routing for this.
So I have two groups set up (
public and
cms) in
config/authentication.php. I control access to my
cms controller with
Code:
$this->require_group('cms');
and to my
public controller with
Code:
$this->require_group('public');
The problem is in each case if there is no user logged in, Community Auth redirects to the same login page. I need two completely different login areas/pages, one for
public and one for
admin.
From looking at
core/Auth_Controller.php it seems that
require_group calls a function
_redirect_to_login_page, which uses the constant
LOGIN_PAGE to get the redirect destination. I don't want to modify the core here, so is there another way of having two login pages? Thanks in advance.