我有一个 group_id 分配给用户,但在我的用户索引页面上,我想知道属于登录用户所属特定组的用户的方式。目前它设置为显示所有用户
public function index() {
$this->User->recursive = 0;
$this->set('users', $this->paginate());
}
我将如何改变它
登录:
public function login() {
if ($this->request->is('post')){
if ($this->Auth->login()) {
$this->redirect($this->Auth->redirect());
}else {
$this->Session->setFlash('Your username or password was incorrect.');
}
}
}
谢谢