Yii2调用未定义的方法setuser

问题描述 投票:-1回答:1

我正在使用Yii2模块dektrium / yii2-user进行用户注册/登录,并在尝试注册时收到上述错误。

PHP User Error – yii\base\ErrorException.
in C:\xampp\htdocs\hello\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\EsmtpTransport.php

我如何找出原因?

yii2 registration undefined-function
1个回答
0
投票

配置应用程序的邮件程序组件时应该非常小心。问题是拼写错误:

'viewpath' => '@app/mailer',

代替

'viewPath' => '@app/mailer',

在/appName/config/web.php中

© www.soinside.com 2019 - 2024. All rights reserved.