mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
792 B
792 B
date | id | title |
---|---|---|
2020-11-16 | 70afdac5-245d-4bc5-920c-5d1b48d5fb5e | IS~REMEMBERED~ |
Description
Checks if user is a "Remember Me" user. Replaces
ISAUTHENTICATEDFULLY &
ISAUTHENTICATEDREMEMBERED
Syntax
// BEFORE
if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED')
&& !$this->isGranted('IS_AUTHENTICATED_FULLY')) {
// ...
}
// AFTER
if ($this->isGranted('IS_REMEMBERED')) {
// ...
}
{# BEFORE #}
{% if is_granted('IS_AUTHENTICATED_ANONYMOUSLY')
and not is_granted('IS_AUTHENTICATED_REMEMBERED')
and not is_granted('IS_AUTHENTICATED_FULLY') %}
{# ... #}
{% endif %}
{# AFTER #}
{% if is_granted('IS_ANONYMOUS') %}
{# ... #}
{% endif %}