Skip to content

Commit

Permalink
Merge pull request #425 from CakeDC/issue/421
Browse files Browse the repository at this point in the history
Fix table override for users
  • Loading branch information
ajibarra authored Sep 13, 2016
2 parents ae71a10 + 1e1d4ad commit 2a337cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
3 changes: 3 additions & 0 deletions config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down
11 changes: 0 additions & 11 deletions src/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
}

0 comments on commit 2a337cb

Please sign in to comment.