Skip to content
Permalink
Browse files

Fix for auth component userModel with plugins. Fixes #799

  • Loading branch information...
shama authored and markstory committed Jun 8, 2010
1 parent ccd036e commit a9fa7ac24027feeda38ca5aa2449da2bb2582dac
@@ -469,7 +469,7 @@ function __setDefaults() {
'loginAction' => array(
'controller' => Inflector::underscore(Inflector::pluralize($model)),
'action' => 'login',
'plugin' => $plugin,
'plugin' => Inflector::underscore($plugin),
),
'sessionKey' => 'Auth.' . $model,
'logoutRedirect' => $this->loginAction,
@@ -1431,6 +1431,16 @@ function testPluginModel() {
$this->assertEqual($user, $expected);
$sessionKey = $this->Controller->Auth->sessionKey;
$this->assertEqual('Auth.TestPluginAuthUser', $sessionKey);
$this->Controller->Auth->loginAction = null;
$this->Controller->Auth->__setDefaults();
$loginAction = $this->Controller->Auth->loginAction;
$expected = array(
'controller' => 'test_plugin_auth_users',
'action' => 'login',
'plugin' => 'test_plugin'
);
$this->assertEqual($loginAction, $expected);
// Reverting changes
Cache::delete('object_map', '_cake_core_');

0 comments on commit a9fa7ac

Please sign in to comment.
You can’t perform that action at this time.