Welcome Guest, Not a member yet? Register   Sign In
Community auth forced login
#7

(05-31-2017, 12:11 AM)mxfragz Wrote: Thank you for you clear and detailed answers.

My mistake was using the
PHP Code:
$bool $this->verify_role('admin'); 
Which disconnects the user if he doesn't have the role.


I used 
PHP Code:
$bool is_role('admin'); 
 instead and it worked from then.

You can also use auth variables:
https://community-auth.com/documentation...-variables

So if you're inside a controller, you can use:


PHP Code:
if( $this->auth_role == 'admin' 


There is lots of flexibility built in, because over time a lot of different things have come up in my own work, so I built them in.
Reply


Messages In This Thread
Community auth forced login - by mxfragz - 05-28-2017, 09:16 PM
RE: Community auth forced login - by skunkbad - 05-29-2017, 08:36 AM
RE: Community auth forced login - by mxfragz - 05-30-2017, 06:19 PM
RE: Community auth forced login - by mxfragz - 05-30-2017, 07:18 PM
RE: Community auth forced login - by skunkbad - 05-30-2017, 10:15 PM
RE: Community auth forced login - by mxfragz - 05-31-2017, 12:11 AM
RE: Community auth forced login - by skunkbad - 05-31-2017, 12:16 PM
RE: Community auth forced login - by mxfragz - 05-31-2017, 06:40 PM
RE: Community auth forced login - by skunkbad - 05-31-2017, 07:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB