Staying Logged In
So you can login just fine, but the user doesn’t stay logged in on subsequent page loads? Don’t worry, there is an error message logged for that too.
What to Expect
DEBUG - 2015-06-28 11:27:17 --> user is banned = no required level or role = 1 auth level in database = 9 auth level in database (string) = admin
Even though this information provides some insight into what Community Auth is considering when maintaining state for your user, I find most often that a problem with staying logged in is a simple cookie related issue. If you’ll take the time to do some simple testing with CodeIgniter generated cookies, you may find that your browser or server has an issue. Since Community Auth uses basic CodeIgniter cookie generation, it’s probably not an issue with Community Auth.
If you’re sure you don’t have a cookie related issue, and still can’t stay logged in, something in the log should stand out.
- The user is banned.
- Community Auth is configured to reject multiple logins, but you are attempting to use the same user account on more than one browser, or more than one device.
- The user’s level or role is not sufficient for the page/action.