Removing AuthComponent::getModel(). Auth no longer directly interacts with models.

This commit is contained in:
mark_story 2011-01-21 16:28:59 -05:00
parent 66f5ae07ed
commit 35864c2a02

View file

@ -605,29 +605,6 @@ class AuthComponent extends Component {
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.