Skip to content

Instantly share code, notes, and snippets.

@svparijs
Created November 21, 2012 19:40
Show Gist options
  • Save svparijs/4127163 to your computer and use it in GitHub Desktop.
Save svparijs/4127163 to your computer and use it in GitHub Desktop.
RegisterAspect Issue
<?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
Copy link

._())") - @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