Skip to content
Browse files

Avoiding unneeded check in Form auth adapter if no data submitted

  • Loading branch information...
1 parent a6ef188 commit 8da2190b3803bf4f4b4b45679e6bf678f6e08510 @mariano committed Jan 8, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 extensions/adapter/security/auth/Form.php
View
3 extensions/adapter/security/auth/Form.php
@@ -104,6 +104,9 @@ public function __construct(array $config = array()) {
*/
public function check($credentials, array $options = array()) {
$data = $this->_filters($credentials->data);
+ if (count(array_filter($data)) === 0) {
+ return false;
+ }
$conditions = $this->_scope + array_diff_key($data, $this->_validators);
$user = call_user_func(array($this->repository, $this->_config['repositoryMethod']), $conditions);

0 comments on commit 8da2190

Please sign in to comment.
Something went wrong with that request. Please try again.