diff --git a/app/Jobs/Auth/UpdateUser.php b/app/Jobs/Auth/UpdateUser.php index 15c66c0ca..9120a6d98 100644 --- a/app/Jobs/Auth/UpdateUser.php +++ b/app/Jobs/Auth/UpdateUser.php @@ -55,6 +55,10 @@ class UpdateUser extends Job if ($this->request->has('companies')) { $this->user->companies()->sync($this->request->get('companies')); } + + if ($this->user->contact) { + $this->user->contact->update($this->request->input()); + } }); return $this->user; diff --git a/app/Jobs/Common/UpdateContact.php b/app/Jobs/Common/UpdateContact.php index e0a58bdf9..a64a1a202 100644 --- a/app/Jobs/Common/UpdateContact.php +++ b/app/Jobs/Common/UpdateContact.php @@ -38,12 +38,14 @@ class UpdateContact extends Job \DB::transaction(function () { if ($this->request->get('create_user', 'false') === 'true') { $this->createUser(); + } elseif ($this->contact->user) { + $this->contact->user->update($this->request->all()); } // Upload logo if ($this->request->file('logo')) { $media = $this->getMedia($this->request->file('logo'), Str::plural($this->contact->type)); - + $this->contact->attachMedia($media, 'logo'); }