DataDoIT
|
Posted: 05/10/2012, 6:58 AM |
|
Under Project Settings -> Security, there is the Login Page directive.
Would like access to that setting through either a globally defined
variable or function such as CCGetLoginPage().
This becomes especially handy when the login page resides under a
subdirectory such as /members/login.ccp or /accounts/login.ccp, which
nearly ALL of our sites do.
Oftentimes we're finding that in cases where we need to do custom
redirects we're having to hard-code in that subdirectory value, which of
course makes the application less portable. We currently keep a
database field with the value and pull from there. We can avoid that
with a simple global variable for that CCS setting.
In the Site XML that value is an attribute:
loginPage="members/login.ccp". In Common that value is hard-coded at
code parsing time in the CCSecurityRedirect() function as: $Link =
ServerURL . "members/login.php". How about instead at code parsing time
simply define it: define("LoginPage", "members/login.php")
|
|
|
|