diff --git a/.gitignore b/.gitignore index 807013a..397e34a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build composer.lock +vendor/ diff --git a/src/Adapter/Db/PdoAdapter.php b/src/Adapter/Db/PdoAdapter.php index 65691f4..2548cbc 100644 --- a/src/Adapter/Db/PdoAdapter.php +++ b/src/Adapter/Db/PdoAdapter.php @@ -86,7 +86,7 @@ public function authenticate() } $validationResult = $this->passwordValidator->isValid( - $this->credential, $user[$this->credentialColumn], $user['id'] + $this->credential, $user[$this->credentialColumn], $user[$this->identityColumn] ); if ($validationResult->isValid()) { diff --git a/tests/Adapter/Db/PdoAdapterTest.php b/tests/Adapter/Db/PdoAdapterTest.php index 1a4ec0a..b0850b0 100644 --- a/tests/Adapter/Db/PdoAdapterTest.php +++ b/tests/Adapter/Db/PdoAdapterTest.php @@ -65,7 +65,7 @@ public function testAuthenticationSuccess() ->with( $this->plainTextPassword, $this->identity['hashed_password'], - $this->identity['id'] + $this->identity['email_address'] ) ->will($this->returnValue(new ValidationResult(ValidationResult::SUCCESS))); @@ -90,7 +90,7 @@ public function testAuthenticationFailsBadPassword() ->with( 'bad password', $this->identity['hashed_password'], - $this->identity['id'] + $this->identity['email_address'] ) ->will($this->returnValue( new ValidationResult(ValidationResult::FAILURE_PASSWORD_INVALID) @@ -130,7 +130,7 @@ public function testIssue13() ->with( $this->plainTextPassword, $this->identity['hashed_password'], - $this->identity['id'] + $this->identity['email_address'] ) ->will($this->returnValue(new ValidationResult(ValidationResult::SUCCESS)));