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

(05-31-2017, 06:40 PM)mxfragz Wrote:
(05-31-2017, 12:16 PM)skunkbad Wrote: 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.

I thought about it but I thought it would be bad practice.
Glad to know that it isn't, might use that later on.


Also consider:


Code:
if( in_array( $this->auth_role, ['admin','employee','yo mama','etc'] ) )
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