Community Auth verify_min_level logging users out? |
(05-23-2016, 12:32 AM)skunkbad Wrote: Yes, use the lowest level that is allowed to access the page. If login is not required at all and you're just trying to verify if anyone is logged in, then use $this->is_logged_in(); at the top of your controller method. Thank you for the quick reply. To clarify, login is required for the entire page, but some sub-content will require higher privileges. The following is a small modification of the Examples->simple_verification() method: PHP Code: public function simple_verification() After logging in and visiting the page for the first time, the correct behaviour ("Hiding admin level content" shown along with the rest of the auth information). However, visiting the page again will show that the user is no longer logged in. Should I avoid calling verify_min_level() if I do not wish to log the user out, and instead just check ($this->auth_level >= 10) instead? Thanks! |
Messages In This Thread |
Community Auth verify_min_level logging users out? - by cwchong - 05-22-2016, 09:46 PM
RE: Community Auth verify_min_level logging users out? - by skunkbad - 05-23-2016, 12:32 AM
RE: Community Auth verify_min_level logging users out? - by cwchong - 05-23-2016, 01:00 AM
RE: Community Auth verify_min_level logging users out? - by skunkbad - 05-23-2016, 07:43 AM
RE: Community Auth verify_min_level logging users out? - by cwchong - 05-23-2016, 08:34 AM
RE: Community Auth verify_min_level logging users out? - by skunkbad - 05-23-2016, 09:54 AM
|