在内置的CakePHP AuthComponent中,我可以通过以下方式在AppController.php中动态更改userModel
或finder
:
$this->Auth->setConfig('authenticate.Form.finder', 'Custom');
但是,在新的身份验证插件(https://github.com/cakephp/authentication/blob/master/docs/Migration-from-the-AuthComponent.md#migrate-authcomponent-settings)中,我在Application.php中设置了userModel
和finder
。
现在,如何在AppController.php中更改这些变量?