Merge pull request #138 from pappfer/patch-4

Make enableAutologin configurable
This commit is contained in:
Antonio Ramirez
2018-02-04 20:40:37 +01:00
committed by GitHub
3 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# CHANGELOG
## 1.1.2 - Work in progress
- Enh #137: Added the ability to make `enableAutologin` configurable (pappfer)
- Enh #135: Added Estonian translation (tonisormisson)
- Bug #133: Fix user search returning no results in admin page (phiurs)
- Bug #125: Fix validation in non-ajax requests (faenir)

View File

@ -149,7 +149,7 @@ class Bootstrap implements BootstrapInterface
$di->set(
'yii\web\User',
[
'enableAutoLogin' => true,
'enableAutoLogin' => $app->getModule('user')->enableAutologin,
'loginUrl' => ['/user/security/login'],
'identityClass' => $di->get(ClassMapHelper::class)->get(User::class),
]

View File

@ -28,6 +28,10 @@ class Module extends BaseModule
* @see http://2fa-library.readthedocs.io/en/latest/
*/
public $twoFactorAuthenticationCycles = 1;
/**
* @var bool whether to allow autologin or not
*/
public $enableAutologin = true;
/**
* @var bool whether to allow registration process or not
*/