public function beforeFilter()
 {
     parent::beforeFilter();
     if (preg_match('/^admin_/', $this->action)) {
         $this->subMenuElements = array('members');
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow('login', 'signup', 'activate', 'reset_password');
     $this->Auth->authenticate = array('Form' => array('userModel' => 'Members.Mypage', 'scope' => array('Mypage.status' => 0)));
     //ログイン画面:デフォルトだとUserControllerになってしまうので強制的に変更する。
     $this->Auth->loginAction = array('controller' => 'mypages', 'action' => 'login');
     $this->Auth->loginRedirect = array('controller' => 'mypages', 'action' => 'index');
     //$this->BcAuth->logoutRedirect = array( 'controller' => 'Mypages', 'action' => 'logout');
     if (preg_match('/^admin_/', $this->action)) {
         $this->subMenuElements = array('members');
     }
 }