Guest User

Untitled

a guest
Aug 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. CodeIgniter - Organizing Controllers into Subfolders
  2. if ($this->user_model->is_user()) {
  3. // load this controller
  4. }
  5.  
  6. class Dashboard extends CI_Controller {
  7.  
  8. function index()
  9. {
  10. //make a check for the user that returns the usergroup:
  11. $user = $this->user_model->is_user();
  12. redirect('controller/'.$user.'/'.$user);
  13. }
  14.  
  15. }
  16.  
  17. $hook['pre_controller'][] = array(
  18. 'class' => 'Select',
  19. 'function' => 'get_usergroup',
  20. 'filename' => 'Select.php',
  21. 'filepath' => 'hooks');
Add Comment
Please, Sign In to add comment