[Neos] How to integrate a custom login form in Neos site layout
Bastian Waidelich
bastian at typo3.org
Fri Feb 7 15:24:45 CET 2014
Pavlina Drosos wrote:
Hi Pavlina,
> I have fixed the problem with the logout button (in Privacy.yaml) and
> I could make a pull request to your repo with the fix if you don't mind.
Far from it, please do.
> [...] I created the plugin with the login form via TypoScript and rendered
> it in the layout. [...] When the login form plugin is added on
> separate page, like in your demo, it works as expected and redirects to the
> profile page. Could you please help me with this and give me a hint how to
> solve it?
The rewriting of URIs between PluginViews is done via AOP, in the
PluginUriAspect[1]. This should work as long as the "profile" PluginView
is connected to the "login" master plugin.
In other words the *TYPO3.Neos:PluginView* node that contains the
profile view should have the properties:
view: "UserProfile"
plugin: "<the/node/path/to/your/plugin>"
see PluginService::getPluginNodeByAction() and
PluginService::getPluginViewNodeByMasterPlugin()
> My other question is how to make the profile page to redirect to the login
> page, when it's opened by unauthenticated user? I have setup the TypoScript
> exceptionHandler to ThrowingHandler inside my package, but I am unaware how
> to do the redirect after that.
That's still a bug in Neos: Security exceptions
(\TYPO3\Flow\Security\Exception) should never be caught..
You can debug \TYPO3\TypoScript\Core\Runtime::handleRenderingException()
but we need to fix that sooner rather than later..
HTH
[1]
https://git.typo3.org/Packages/TYPO3.Neos.git/blob/HEAD:/Classes/TYPO3/Neos/Aspects/PluginUriAspect.php
--
Bastian Waidelich
More information about the Neos
mailing list