user->pid = $data['pid']; $this->user->created_uuid = $data['created_uuid']; $this->user->updated_uuid = $data['updated_uuid']; $this->user->deactivated_at = $data['deactivated_at']; $this->user->deactivated_uuid = $data['deactivated_uuid']; $this->user->registered_at = $data['registered_at']; $this->user->registered_ip = $data['registered_ip']; $this->user->username = $data['username']; $this->user->email_hashed = $data['email_hashed']; $this->user->email_encrypted = $data['email_encrypted']; $this->user->password = $data['password']; $this->user->passwordchange_required = $data['passwordchange_required']; $this->user->save(); $this->user->groups()->attach($data['groups']); return $this->user; } }