Skip to content

Commit

Permalink
Removing AuthComponent::getModel(). Auth no longer directly interacts…
Browse files Browse the repository at this point in the history
… with models.
  • Loading branch information
markstory committed Feb 4, 2011
1 parent 66f5ae0 commit 35864c2
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions cake/libs/controller/components/auth.php
Expand Up @@ -605,29 +605,6 @@ public function redirect($url = null) {
return Router::normalize($redir);
}

/**
* Returns a reference to the model object specified, and attempts
* to load it if it is not found.
*
* @param string $name Model name (defaults to AuthComponent::$userModel)
* @return object A reference to a model object
*/
public function &getModel($name = null) {
$model = null;
if (!$name) {
$name = $this->userModel;
}

$model = ClassRegistry::init($name);

if (empty($model)) {
trigger_error(__('Auth::getModel() - Model is not set or could not be found'), E_USER_WARNING);
return null;
}

return $model;
}

/**
* Use the configured authentication adapters, and attempt to identify the user
* by credentials contained in $request.
Expand Down

0 comments on commit 35864c2

Please sign in to comment.