Error when creating new user
mlogothetis opened this issue · 1 comments
mlogothetis commented
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
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);
}
}