• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check for roles inside model?

#1
Brick 
Hi,
i'm using Community Auth for Authentication. I want to restrict the database result based on the role
Right now in the model the funcions are like this:

get_finantial_report( some parameters, user_level, user_id)
and i get the user_level and user_id in the controller:
$this->auth_role
$this->auth_user_id


Would be better to remove those parameters (user_level, user_id) form the function and get them inside the funcion instead off passing them from controller to model?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.