Be.security.ifAuthenticated ViewHelper <f:be.security.ifAuthenticated>
ViewHelper implementing an ifAuthenticated/else condition for backend users and backend groups.
Go to the source code of this ViewHelper: Be\Security\IfAuthenticatedViewHelper.php (GitHub).
Table of contents
Examples
Basic usage:
packages/my_extension/Resources/Private/Templates/Module/Index.fluid.html
<f:be.security.ifAuthenticated>
This is being shown whenever a BE user is logged in
</f:be.security.ifAuthenticated>
Copied!
Everything inside the
<f: tag is being displayed
if the user is authenticated with any backend user account.
IfAuthenticated / then / else:
packages/my_extension/Resources/Private/Templates/Module/Index.fluid.html
<f:be.security.ifAuthenticated>
<f:then>
This is being shown in case you have access.
</f:then>
<f:else>
This is being displayed in case you do not have access.
</f:else>
</f:be.security.ifAuthenticated>
Copied!
Everything inside the
<f: is displayed if the backend user is logged in.
<f: is displayed if no backend user is logged in.
Arguments of the <f:be.security.ifAuthenticated> ViewHelper
else
-
- Type
- mixed
Value to be returned if the condition if not met.
then
-
- Type
- mixed
Value to be returned if the condition if met.