I want to show custom Login Templates for admins and clients trying to log in on the site.
Therefore I would have to know to which Viewer Group that page belongs (client or admin).
I have already the basic setup to perform a switch...
I have a custom loginform (CustomLoginForm.php) class, which I enabled using this in config.php:
To use a custom template for the login form you just have to put a file named "Security_login.ss" in the Layout folder.
So far so good.
In CustomLoginForm.php I want to check the Viewer Group of the visited page with a function.
But I do not know how to get that info. So far I can access $_REQUEST['BackURL'], which is /admin or /client/something.
I could to the switch on that BackURL, but that doesn´t seem to be a cool solution :)
Does anyone know better?