mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-17 15:09:50 +00:00
Merge remote branch 'ceeram/1.3-467' into 1.3
This commit is contained in:
commit
817ebf5ec8
2 changed files with 8 additions and 4 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);
|
trigger_error(__("Could not find \$userModel. Please set AuthComponent::\$userModel in beforeFilter().", true), E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
list($plugin, $model) = pluginSplit($this->userModel);
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'loginAction' => array(
|
'loginAction' => array(
|
||||||
'controller' => Inflector::underscore(Inflector::pluralize($this->userModel)),
|
'controller' => Inflector::underscore(Inflector::pluralize($model)),
|
||||||
'action' => 'login'
|
'action' => 'login',
|
||||||
|
'plugin' => $plugin,
|
||||||
),
|
),
|
||||||
'sessionKey' => 'Auth.' . $this->userModel,
|
'sessionKey' => 'Auth.' . $model,
|
||||||
'logoutRedirect' => $this->loginAction,
|
'logoutRedirect' => $this->loginAction,
|
||||||
'loginError' => __('Login failed. Invalid username or password.', true),
|
'loginError' => __('Login failed. Invalid username or password.', true),
|
||||||
'authError' => __('You are not authorized to access that location.', true)
|
'authError' => __('You are not authorized to access that location.', true)
|
||||||
|
|
|
@ -1429,6 +1429,8 @@ class AuthTest extends CakeTestCase {
|
||||||
'id' => 1, 'username' => 'gwoo', 'created' => '2007-03-17 01:16:23', 'updated' => date('Y-m-d H:i:s')
|
'id' => 1, 'username' => 'gwoo', 'created' => '2007-03-17 01:16:23', 'updated' => date('Y-m-d H:i:s')
|
||||||
));
|
));
|
||||||
$this->assertEqual($user, $expected);
|
$this->assertEqual($user, $expected);
|
||||||
|
$sessionKey = $this->Controller->Auth->sessionKey;
|
||||||
|
$this->assertEqual('Auth.TestPluginAuthUser', $sessionKey);
|
||||||
|
|
||||||
// Reverting changes
|
// Reverting changes
|
||||||
Cache::delete('object_map', '_cake_core_');
|
Cache::delete('object_map', '_cake_core_');
|
||||||
|
|
Loading…
Add table
Reference in a new issue