前面留了一条,后来改了改URL加上/security能找到页面,供参考,layouts/main.php:
if (Yii::$app->user->isGuest) {
array_push($navItems,['label' => 'Sign In', 'url' => ['/user/security/login']],['label' => 'Sign Up', 'url' => ['/user/registration/register']]);
} else {
array_push($navItems,['label' => 'Logout (' . Yii::$app->user->identity->username . ')',
'url' => ['/site/security/logout'],
'linkOptions' => ['data-method' => 'post']]
);
}
但碰到另外问题,邮件提示发出,但没收到,继续尝试中。