Skip to content

Commit

Permalink
Removing AuthComponent::validate() there are no tests and no document…
Browse files Browse the repository at this point in the history
…ation on this method. It also uses components that may or may not exist even in the old implementation.
  • Loading branch information
markstory committed Feb 4, 2011
1 parent 28ad51c commit 66f5ae0
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cake/libs/controller/components/auth.php
Expand Up @@ -605,28 +605,6 @@ public function redirect($url = null) {
return Router::normalize($redir);
}

/**
* Validates a user against an abstract object.
*
* @param mixed $object The object to validate the user against.
* @param mixed $user Optional. The identity of the user to be validated.
* Uses the current user session if none specified. For
* valid forms of identifying users, see
* AuthComponent::identify().
* @param string $action Optional. The action to validate against.
* @see AuthComponent::identify()
* @return boolean True if the user validates, false otherwise.
*/
public function validate($object, $user = null, $action = null) {
if (empty($user)) {
$user = $this->user();
}
if (empty($user)) {
return false;
}
return $this->Acl->check($user, $object, $action);
}

/**
* Returns a reference to the model object specified, and attempts
* to load it if it is not found.
Expand Down

0 comments on commit 66f5ae0

Please sign in to comment.