Skip to content

src/ZfcUser/Authentication/Adapter/Db.php uses an undefined constant of Zend/Authentication/Result.php #198

thewildandy opened this Issue Dec 10, 2012 · 3 comments

4 participants


In src/ZfcUser/Authentication/Adapter/Db.php on line 75 is this code:
However, Zend/Authentication/Result.php has no constant defined for FAILURE_INACTIVE. This causes a fatal error when a user with a disallowed state attempts to log in.

@hikaru-shindo hikaru-shindo added a commit to hikaru-shindo/ZfcUser that referenced this issue Dec 14, 2012
@hikaru-shindo hikaru-shindo Update src/ZfcUser/Authentication/Adapter/Db.php
Fix for issue #198.

The used constant was not defined in the AuthenticationResult so I changed an uncategorized error.

This is still not fixed:
Fatal error: Undefined class constant 'FAILURE_INACTIVE' in /home/www/tilburg/vendor/zf-commons/zfc-user/src/ZfcUser/Authentication/Adapter/Db.php on line 75

This line is the problem: 0ef8c63#L3R75

@hikaru-shindo wouldn't it be better to really use this status code instead of FAILURE_UNCATEGORIZED? Displaying a nice message to the user is otherwise not very easy.

@artur-gajewski Could you fix this? (since you broke it)


@yourithielen Any error code (negative values) smaller then uncategorized (-5) will be set to failure (0) and greater codes then success (1) is set to success. A nice message is already shown since it's passed to the result. It's not really easy to translate this through...

In my opinion Zend\Authentication\Result should allow for custom result codes through...

@spiffyjr spiffyjr closed this Jun 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.