From 1e1d4ad3a7964d5bd294bf18d8ff3f9792dfc811 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Tue, 13 Sep 2016 13:08:37 -0500 Subject: [PATCH] Fix table override for users --- config/bootstrap.php | 3 +++ src/Controller/UsersController.php | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/config/bootstrap.php b/config/bootstrap.php index ba2ac6cb1..4592fb2e1 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -22,6 +22,9 @@ Configure::load($file); }); +TableRegistry::config('Users', ['className' => Configure::read('Users.table')]); +TableRegistry::config('CakeDC/Users.Users', ['className' => Configure::read('Users.table')]); + if (Configure::check('Users.auth')) { Configure::write('Auth.authenticate.all.userModel', Configure::read('Users.table')); } diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index e0e061921..996398a3c 100644 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -36,15 +36,4 @@ class UsersController extends AppController use RegisterTrait; use SimpleCrudTrait; use SocialTrait; - - /** - * Initialize and set defaults for model class - * - * @return void - */ - public function initialize() - { - parent::initialize(); - $this->_setModelClass(Configure::read('Users.table')); - } }