mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
fix for ticket #467 setting correct defaults when userModel is a plugin
model
This commit is contained in:
parent
7337c12f4f
commit
71e2fb533d
1 changed files with 5 additions and 3 deletions
|
@ -448,12 +448,14 @@ class AuthComponent extends Object {
|
|||
trigger_error(__("Could not find \$userModel. Please set AuthComponent::\$userModel in beforeFilter().", true), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
list($plugin, $model) = pluginSplit($this->userModel);
|
||||
$defaults = array(
|
||||
'loginAction' => array(
|
||||
'controller' => Inflector::underscore(Inflector::pluralize($this->userModel)),
|
||||
'action' => 'login'
|
||||
'controller' => Inflector::underscore(Inflector::pluralize($model)),
|
||||
'action' => 'login',
|
||||
'plugin' => $plugin,
|
||||
),
|
||||
'sessionKey' => 'Auth.' . $this->userModel,
|
||||
'sessionKey' => 'Auth.' . $model,
|
||||
'logoutRedirect' => $this->loginAction,
|
||||
'loginError' => __('Login failed. Invalid username or password.', true),
|
||||
'authError' => __('You are not authorized to access that location.', true)
|
||||
|
|
Loading…
Reference in a new issue