diff --git a/controllers/users_controller.php b/controllers/users_controller.php index cbde9c6c..5e0bb9b4 100755 --- a/controllers/users_controller.php +++ b/controllers/users_controller.php @@ -57,9 +57,12 @@ class UsersController extends AppController { $this->redirect($this->Auth->logout()); } - function index() { + function index($type = 'user') { $this->User->recursive = 0; - $this->set('users', $this->paginate()); + + $users = $this->paginate(array('User.type'=> $type)); + + $this->set('users', $users); } /** diff --git a/views/pages/admin.ctp b/views/pages/admin.ctp index 61af84ba..195fafb3 100644 --- a/views/pages/admin.ctp +++ b/views/pages/admin.ctp @@ -5,6 +5,7 @@