When a user doesn't have the credentials required for an action, symfony tries to access to the default/secure
action.
To customize the "Credentials Required" page, add the executeLogin()
method in the apps/frontend/modules/default/actions/actions.class.php
file:
/**
* Warning page for restricted area - requires login
*
*/
public function executeSecure()
{
}
Then create the apps/frontend/modules/default/templates/secureSuccess.php
template.
If you want, you can grab the original file and modify it.
In one of your modules, add in apps/frontend/modules/yourModule/config/security.yml
:
all:
credentials: [ aCredentialYouDontHave ]
If you want to use an other module, modify apps/frontend/config/settings.yml
:
all:
.actions:
secure_module: foo # To be called when a user doesn't have
secure_action: bar # The credentials required for an action
Clear your cache.
php symfony cc
Powered by jQuery UI and symfony. Symfony Check
The content this site is published under a Creative Commons License. Some parts of the content are a remix of the official symfony documentation.