Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

Imagine I have the following link in Twig:

{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
    <a href="{{ path('app_change_password') }}">Change Password</a>
{% endif %}

And this code in the controller:

/**
 * @Route("/change/password", name="app_change_password")
 */
public function changePassword()
{
    $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
}

Does this code make sense?

userVoice