mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Removing AuthComponent::getModel(). Auth no longer directly interacts with models.
This commit is contained in:
parent
66f5ae07ed
commit
35864c2a02
1 changed files with 0 additions and 23 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue