I’m wondering how to override url rules from a module.
I have this code in the external module (dektrium/yii2-user/Bootstrap.php) :
$app->get('urlManager')->rules = new GroupUrlRule([ 'prefix' => 'user', 'rules' => [ '<id:\d+>' => 'profile/show', '<action:(login|logout)>' => 'security/<action>', '<action:(register|resend)>' => 'registration/<action>', 'confirm/<id:\d+>/<token:\w+>' => 'registration/confirm', 'forgot' => 'recovery/request', 'recover/<id:\d+>/<token:\w+>' => 'recovery/reset', 'settings/<action:\w+>' => 'settings/<action>' ] ]);
And i want to override this rules in my config.php because i think is not a good thing to modify module code for this such of thing, and because am working in a multilanguage app with especific managment of urls.
Is there a way to do it, in my global urlManager rules definition?
thanks in advance.