Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when creating new user #4

Open
mlogothetis opened this issue Sep 25, 2014 · 1 comment
Open

Error when creating new user #4

mlogothetis opened this issue Sep 25, 2014 · 1 comment

Comments

@mlogothetis
Copy link

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
Copy link
Contributor

keltstr commented Jan 31, 2015

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);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants