Created
November 21, 2012 19:40
-
-
Save svparijs/4127163 to your computer and use it in GitHub Desktop.
RegisterAspect Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Security\Manager\Aspect; | |
/* * | |
* This script belongs to the TYPO3 Flow package "Security.Manager". * | |
* * | |
* */ | |
use TYPO3\Flow\Annotations as Flow; | |
/** | |
* @Flow\Aspect | |
*/ | |
class RegisterAspect { | |
/** | |
* @var \TYPO3\Flow\Log\LoggerInterface A logger implementation | |
*/ | |
protected $logger; | |
/** | |
* For logging we need a logger, which we will get injected automatically by | |
* the Object Manager | |
* | |
* @param \TYPO3\Flow\Log\SystemLoggerInterface $logger The System Logger | |
* @return void | |
*/ | |
public function injectSystemLogger(\TYPO3\Flow\Log\SystemLoggerInterface $systemLogger) { | |
$this->logger = $systemLogger; | |
} | |
/** | |
* Intercept the Action request and check if the Settings.yaml contains a Register: TRUE | |
* | |
* ##Flow\Before("method(Security\Manager\Controller\.*->new.*())") | |
* @Flow\Before("method(Security\Manager\.*->.*())") | |
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point | |
* @return void | |
*/ | |
public function anonymousRegistrationDisallowedBySettingsAdvice(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint) { | |
\TYPO3\Flow\var_dump(array(),'Vardump'); | |
$logMessage = 'The method ' . $joinPoint->getMethodName() . ' in class ' . $joinPoint->getClassName() . ' has been called.'; | |
$this->logger->log($logMessage); | |
//$joinPoint->redirect('index','Login'); | |
} | |
} | |
?> |
radmiraal
commented
Nov 21, 2012
._())")
- @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
- @return void
*/
public function anonymousRegistrationDisallowedBySettingsAdvice(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint) {
\TYPO3\Flow\var_dump(array(),'Vardump');
}
}
?>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment