From: Christian Weiske Date: Fri, 28 Feb 2014 09:55:13 +0000 (+0100) Subject: [BUGFIX] @return for TYPO3\CMS\Sv\AuthenticationService::authUser X-Git-Tag: TYPO3_6-2-0beta6~50 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/debfec7fb0d22b9b74c578f98189de3939454a95?hp=630b877ba7203b8f2ae8738ce9c80c2a683499e0 [BUGFIX] @return for TYPO3\CMS\Sv\AuthenticationService::authUser Adjust the @return documentation of authUser() to match the actual implementation in TYPO3\CMS\Core\Authentication\AbstractUserAuthentication Change-Id: I2d94cdfee6c58de80c7ec2be2b644b5fcd6c9a97 Resolves: #56421 Releases: 6.0, 6.1, 6.2 Reviewed-on: https://review.typo3.org/27931 Reviewed-by: Markus Klein Tested-by: Markus Klein Reviewed-by: Oliver Klee Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel --- diff --git a/typo3/sysext/sv/Classes/AuthenticationService.php b/typo3/sysext/sv/Classes/AuthenticationService.php index bda31c760a10..d29431b8f2cd 100644 --- a/typo3/sysext/sv/Classes/AuthenticationService.php +++ b/typo3/sysext/sv/Classes/AuthenticationService.php @@ -104,7 +104,15 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService * Authenticate a user (Check various conditions for the user that might invalidate its authentication, eg. password match, domain, IP, etc.) * * @param array $user Data of user. - * @return boolean + * + * @return integer >= 200: User authenticated successfully. + * No more checking is needed by other auth services. + * >= 100: User not authenticated; this service is not responsible. + * Other auth services will be asked. + * > 0: User authenticated successfully. + * Other auth services will still be asked. + * <= 0: Authentication failed, no more checking needed + * by other auth services. */ public function authUser(array $user) { $OK = 100; @@ -128,7 +136,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService $this->writelog(255, 3, 3, 1, 'Login-attempt from %s (%s), username \'%s\', locked domain \'%s\' did not match \'%s\'!', array($this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $user[$this->db_user['username_column']], $user['lockToDomain'], $this->authInfo['HTTP_HOST'])); \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf('Login-attempt from %s (%s), username \'%s\', locked domain \'%s\' did not match \'%s\'!', $this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $user[$this->db_user['username_column']], $user['lockToDomain'], $this->authInfo['HTTP_HOST']), 'Core', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING); } - $OK = FALSE; + $OK = 0; } } return $OK;