PHP code example of jorenvanhee / craft-template-guard
1. Go to this page and download the library: Download jorenvanhee/craft-template-guard library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jorenvanhee / craft-template-guard example snippets
return [
'*' => [
// This template will be used for the login page. Leave empty for the
// default. Take a look at `src/templates/custom-login-example.twig`
// in the plugin repository to develop your own custom template.
'template' => '',
// The URI for the login page.
'loginRoute' => 'template-guard/login',
// Cookie lifetime in seconds.
'cookieLifetimeInSeconds' => 60 * 60,
// Maximum amount of login attempts across a period.
'maxLoginAttempts' => 5,
// Period in seconds used to count the max login attempts.
'maxLoginAttemptsPeriodInSeconds' => 300,
],
];