1

I installed yii2-user. On the login view there are a couple links at the bottom of the form.

<?= Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>

and

<?= Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>

When I click either of these links the registration part of the url is taken out. So I'm left with a page not found. It will send me to

http://localhost/webs/parlay/web/index.php/user/resend

instead of sending me to

http://localhost/webs/parlay/web/index.php/user/registration/resend

heres my urlManager config.

'urlManager' => [
        'class' => 'yii\web\UrlManager',
        // Disable index.php
        'showScriptName' => true,
        // Disable r= routes
        'enablePrettyUrl' => true,
        'rules' => array(
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
        ),
    ],
Shawn Sonnier
  • 513
  • 5
  • 10
  • 28

2 Answers2

0

Check this thread, perhaps you have old release of yii2-user package.

You can try remove / from /user/registration/resend or write custom rule like

'user/resend' => 'user/registration/resend'

Onedev_Link
  • 1,981
  • 13
  • 26
0

added

<module:user>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>

to url manager. now working

Shawn Sonnier
  • 513
  • 5
  • 10
  • 28