-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.php
More file actions
64 lines (57 loc) · 2.8 KB
/
Copy pathModule.php
File metadata and controls
64 lines (57 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace chipmob\user;
/**
* User module.
*
* @property string $enableRegistration Whether to enable registration
* @property string $enableGeneratingPassword Whether to remove password field from registration form
* @property string $enableConfirmation Whether user has to confirm his account
* @property string $enableUnconfirmedLogin Whether to allow logging in without confirmation
* @property string $enablePasswordRecovery Whether to enable password recovery
* @property string $enableAccountDelete Whether user can remove his account
* @property string $enableImpersonateUser Enable the 'impersonate as another user' function
*
* @property int $rememberFor The time you want the user will be remembered without asking for credentials
* @property int $loginLifetime Время жизни сессии для login
* @property int $switchUserLifetime Время жизни сессии для switch
* @property int $confirmWithin The time before a confirmation token becomes invalid
* @property int $recoverWithin The time before a recovery token becomes invalid
*
* @property int $cost Cost parameter used by the Blowfish hash algorithm
* @property string $adminPermission The Administrator permission name
* @property array $mailerConfig Mailer configuration
* @property array $modelMap Model map
*
* @property string $urlPrefix The prefix for user module URL.
* @see [[GroupUrlRule::prefix]]
*
* @property array $urlRules The rules to be used in URL management
*/
class Module extends \yii\base\Module
{
public bool $enableRegistration = true;
public bool $enableGeneratingPassword = false;
public bool $enableConfirmation = true;
public bool $enableUnconfirmedLogin = false;
public bool $enablePasswordRecovery = true;
public bool $enableAccountDelete = false;
public bool $enableImpersonateUser = true;
public int $rememberFor = 2 * 7 * 24 * 60 * 60; // two weeks
public int $loginLifetime = 1 * 60 * 60; // 1 hour
public int $switchUserLifetime = 1 * 60 * 60; // 1 hour
public int $confirmWithin = 24 * 60 * 60; // 24 hours
public int $recoverWithin = 6 * 60 * 60; // 6 hours
public int $cost = 13;
public ?string $adminPermission = null;
public array $mailerConfig = [];
public array $modelMap = [];
public string $urlPrefix = 'user';
public array $urlRules = [
'<action:(login|logout|totp|auth)>' => 'security/<action>',
'<action:(register|connect|resend)>' => 'registration/<action>',
'confirm/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'registration/confirm',
'forgot' => 'recovery/request',
'recover/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'recovery/reset',
'settings/<action:\w+>' => 'settings/<action>',
];
}