vova07 / yii2-users-module

This module provide a users managing system for your yii2 application.
24 stars 15 forks source link

Error when creating new user #4

Open mlogothetis opened 10 years ago

mlogothetis commented 10 years ago

When create a new user, we have this errorr

Missing argument 2 for yii\db\BaseActiveRecord::afterSave(), called in C:\EasyPHP\data\localweb\yii\basic\vendor\vova07\yii2-users-module\models\backend\User.php on line 143 and defined

because the "public function afterSave($insert, $changedAttributes)" have change with a new add parameter in the base framework.

keltstr commented 9 years ago

To fix it - IN models/backend/User.php in two lines add parameter $changedAtrr: public function afterSave($insert,$changedAtrr) { parent::afterSave($insert,$changedAtrr); if ($this->profile !== null) { $this->profile->save(false); } }