Skip to content

Commit 35864c2

Browse files
committed
Removing AuthComponent::getModel(). Auth no longer directly interacts with models.
1 parent 66f5ae0 commit 35864c2

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

cake/libs/controller/components/auth.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -605,29 +605,6 @@ public function redirect($url = null) {
605605
return Router::normalize($redir);
606606
}
607607

608-
/**
609-
* Returns a reference to the model object specified, and attempts
610-
* to load it if it is not found.
611-
*
612-
* @param string $name Model name (defaults to AuthComponent::$userModel)
613-
* @return object A reference to a model object
614-
*/
615-
public function &getModel($name = null) {
616-
$model = null;
617-
if (!$name) {
618-
$name = $this->userModel;
619-
}
620-
621-
$model = ClassRegistry::init($name);
622-
623-
if (empty($model)) {
624-
trigger_error(__('Auth::getModel() - Model is not set or could not be found'), E_USER_WARNING);
625-
return null;
626-
}
627-
628-
return $model;
629-
}
630-
631608
/**
632609
* Use the configured authentication adapters, and attempt to identify the user
633610
* by credentials contained in $request.

0 commit comments

Comments
 (0)