/** * @inheritdoc */ protected function loadAttributes(\dektrium\user\models\User $user) { $user->setAttributes(['email' => $this->email, 'username' => $this->username, 'password' => $this->password]); $profile = \Yii::createObject(Profile::className()); $profile->setAttributes(['name' => ucwords(strtolower($this->firstname)) . " " . ucwords(strtolower($this->lastname)), 'firstname' => ucwords(strtolower($this->firstname)), 'lastname' => ucwords(strtolower($this->lastname)), 'birthday' => $this->birthday, 'terms' => $this->terms]); $user->setProfile($profile); }
public function loadAttributes(User $user) { $user->setAttributes($this->attributes); $profile = \Yii::createObject(Profile::className()); $profile->setAttributes(['name' => $this->name]); $user->setProfile($profile); }