(10-24-2015, 10:02 AM)Martin7483 Wrote: (10-23-2015, 05:48 PM)skunkbad Wrote: LOGIN_PAGE is a constant, so you DO NOT put quotes around it. If PHP is complaining that it is not defined, then you have not defined it, which means it is probably not added to your auth_constants.php hook. If auth_constants.php exists in your application/hooks directory, then you must ensure that hooks are enabled in config/config.php, and that the hook is defined in config/hooks.php. All of this is well documented, so please take the time to re-read the documentation.
Why would you want to use a constant as an array key?
When you set a varialble or key name incorrectly you get this PHP error.
Why would you want to use a constant as an array key? Because you can. Community Auth uses this constant to set a route to the login page. You can change this easily because it is a constant, and it would be updated throughout your application. If you're really interested to see how it works, you might spend some time browsing the Community Auth repo and docs.
As for your suggestion that when a variable or key name is set incorrectly that you get "this PHP error", perhaps you should go up to the origin post and see that this error is directly related to the constant not being defined. This only happens when the constant isn't defined, and this can happen for reasons I have already described. This has nothing to do with a constant being used as an array key, which is perfectly acceptable use of PHP.
Your misunderstanding of the way the LOGIN_PAGE constant works, the way PHP works, and the way Community Auth works doesn't change the real answer to the original problem. Please do not answer questions about Community Auth unless you are absolutely sure you are correct, because in this case you are not.