Community Auth problem with login |
First, if you are changing your login page from "/login" to "/welcome/index", all you need to do is change the LOGIN_PAGE constant in auth_constants.php:
Code: define('LOGIN_PAGE', 'welcome'); This would mean that if somebody goes to the welcome URI, aka welcome/index, then they would be presented with the login page. If instead you want to use "/login" as your URI, and you want the welcome/index to handle the login page, just copy/modify the login method that comes inside controllers/Examples.php. Something like this: Code: public function index() That is just the login page, not a page for anything else. If you want an additional login page, then you must add that URI string to $config['allowed_pages_for_login'], but you haven't done that correctly, and I'm not sure what exactly you are trying to do. You have a welcome/login method, so it sounds like what you really wanted to do is change the LOGIN_PAGE constant to "welcome/login". Yes, you are for sure only going to be able to login as admin if your code is the way it is. Instead, you might try this: Code: if( $this->require_role('admin,ag,an') ) |
Messages In This Thread |
Community Auth problem with login - by yettie - 02-29-2016, 10:51 AM
RE: Community Auth problem with login - by skunkbad - 02-29-2016, 02:00 PM
RE: Community Auth problem with login - by yettie - 03-02-2016, 08:53 AM
RE: Community Auth problem with login - by skunkbad - 03-02-2016, 02:27 PM
|