ユーザーに 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.');
}
}
}
ありがとう