Closed amlopezalonso closed 1 year ago
Ah sorry, needed to map RegistrationForm in web.php:
'classMap' => [
'LoginForm' => 'app\models\LoginForm',
'RegistrationForm' => 'app\models\RegistrationForm',
],
Hi,
Have your extension applied to my login form and have no issues, but when trying it with my registration form I get the following:
yii\base\UnknownPropertyException: Getting unknown property: Da\User\Form\RegistrationForm::verifyCode in /myapp/vendor/yiisoft/yii2/base/Component.php:154 Stack trace:
0 /myapp/vendor/yiisoft/yii2/helpers/BaseHtml.php(2280): yii\base\Component->__get()
1/myapp/vendor/yiisoft/yii2/helpers/BaseHtml.php(1372): yii\helpers\BaseHtml::getAttributeValue()
2 /myapp/vendor/yiisoft/yii2/widgets/InputWidget.php(106): yii\helpers\BaseHtml::activeInput()
3 /myapp/vendor/yiisoft/yii2/captcha/Captcha.php(107): yii\widgets\InputWidget->renderInputHtml()
4 /myapp/vendor/yiisoft/yii2/base/Widget.php(146): yii\captcha\Captcha->run()
5 /myapp/vendor/yiisoft/yii2/widgets/ActiveField.php(795): yii\base\Widget::widget()
6 /myapp/views/user/registration/register.php(61): yii\widgets\ActiveField->widget()
7 //myapp/vendor/yiisoft/yii2/base/View.php(347): require('/usr/local/shar...')
8 /myapp/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile()
9 /myapp/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile()
10 /myapp/vendor/yiisoft/yii2/base/Controller.php(407): yii\base\View->render()
11 /myapp/vendor/2amigos/yii2-usuario/src/User/Controller/RegistrationController.php(147): yii\base\Controller->render()
12 [internal function]: Da\User\Controller\RegistrationController->actionRegister()
13 /myapp/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
14 /myapp/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
15 /myapp/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
16 /myapp/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()
17 /myapp/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest()
18 /myapp/web/index.php(12): yii\base\Application->run()
19 {main}`
In
RegistrationForm
I got pretty much the same as in LoginForm:And in
register.php
view:What can I be doing wrong?