These are chat archives for dektrium/yii2-user

19th
Aug 2015
Eugene Shkurnikov
@nikshev
Aug 19 2015 14:17

Hi all! Something I can't understand. I installed all by instruction. Migrate was successful. But if I try http:/domain.com/user/security/login or other I get 404 error. I use basic Yii 2 template. In my web.php:
.
.
.
'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
'<alias:register>' => 'user/registration/<alias>',
'<alias:logout|login>' => 'user/security/<alias>'
]
],
'user' => [
'identityClass' => 'app\models\User',
'enableAutoLogin' => true,
],
.
.

In my console.php:
.
.
.
'modules' => [
'gii' => 'yii\gii\Module',
'user' => [
'class' => 'dektrium\user\Module',
],
],
.
.

What I don't understand? Thanks for any help

Eugene Shkurnikov
@nikshev
Aug 19 2015 14:36
Sorry! I fix problem! For fix this problem I move modules block from console.php to web.php, comment user block in components (web.php), and add to components (web.php) 'view' => [
'theme' => [
'pathMap' => [
'@dektrium/user/views' => '@app/views/user'
],
],
],