first commit

This commit is contained in:
Antonio Ramirez
2016-12-03 16:01:05 +01:00
commit a6c48a3d1d
11 changed files with 1256 additions and 0 deletions

50
lib/User/Module.php Normal file
View File

@ -0,0 +1,50 @@
<?php
namespace Da\User;
/**
*
* Module.php
*
* Date: 3/12/16
* Time: 15:15
* @author Antonio Ramirez <hola@2amigos.us>
*/
class Module extends \yii\base\Module
{
public $token
/**
* @var int the time before a recovery token is invalid. Defaults to 6 hours.
*/
public $tokenRecoveryWithin = 21600;
/**
* @var array a list of admin usernames
*/
public $administrators = [];
/**
* @var string the administrator permission name
*/
public $administratorPermissionName;
/**
* @var array the class map used by the module.
*
* @see Bootstrap
*/
public $classmap = [];
/**
* @var string the route prefix
*/
public $prefix = 'user';
/**
* @var array the url rules (routes)
*/
public $routes = [
'<id:\d+>' => 'profile/show',
'<action:(login|logout)>' => 'security/<action>',
'<action:(register|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>'
];
}