Skip to content

Commit

Permalink
Merge pull request #5 from JoelGilliland/master
Browse files Browse the repository at this point in the history
Fixed bug in LdapAuth where it assumed authenticate returned boolean res...
  • Loading branch information
Nitecon committed Oct 24, 2013
2 parents 572d6f0 + 70fcad7 commit d4d8003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ZfcUserLdap/Authentication/Adapter/LdapAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function authenticate(AuthEvent $e)
}
}
$ldapAuthAdapter = $this->serviceManager->get('ZfcUserLdap\LdapAdapter');
if (!$ldapAuthAdapter->authenticate($identity, $credential)) {
if ($ldapAuthAdapter->authenticate($identity, $credential) !== true) {
// Password does not match
$e->setCode(AuthenticationResult::FAILURE_CREDENTIAL_INVALID)
->setMessages(array('Supplied credential is invalid.'));
Expand Down
3 changes: 2 additions & 1 deletion src/ZfcUserLdap/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace ZfcUserLdap\Entity;

use ZfcUser\Entity\UserInterface;
use ZfcRbac\Identity\IdentityInterface;

class User implements UserInterface
class User implements UserInterface, IdentityInterface
{

/**
Expand Down

0 comments on commit d4d8003

Please sign in to comment.