diff --git a/README.md b/README.md index fbc7f847f..29f366350 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ > The all-inclusive e-commerce solution of OctoberCMS. -[![Build Status](https://travis-ci.com/OFFLINE-GmbH/oc-mall-plugin.svg?branch=develop)](https://travis-ci.com/github/OFFLINE-GmbH/oc-mall-plugin) - **Mall** is a fully featured online shop solution for October CMS. - Manage Products and Variants diff --git a/classes/customer/DefaultSignUpHandler.php b/classes/customer/DefaultSignUpHandler.php index f7d3a96be..9b33081ca 100644 --- a/classes/customer/DefaultSignUpHandler.php +++ b/classes/customer/DefaultSignUpHandler.php @@ -217,6 +217,9 @@ protected function createUser($data, $requiresConfirmation) if (class_exists(\RainLab\User\Models\Setting::class)) { $data['first_name'] = $data['firstname']; $data['last_name'] = $data['lastname']; + + unset($data['name']); + unset($data['surname']); } $user = Auth::register($data, ! $requiresConfirmation); diff --git a/components/CustomerProfile.php b/components/CustomerProfile.php index 4a70b6745..2cdace63d 100644 --- a/components/CustomerProfile.php +++ b/components/CustomerProfile.php @@ -99,6 +99,15 @@ public function onSubmit() $this->user->surname = $data['lastname']; $this->user->email = $data['email']; + // RainLab.User 3.0 + if (class_exists(\RainLab\User\Models\Setting::class)) { + $this->user->first_name = $data['firstname']; + $this->user->last_name = $data['lastname']; + + unset($this->user->name); + unset($this->user->surname); + } + if ($data['password']) { $this->user->password = $data['password']; $this->user->password_confirmation = $data['password_repeat']; diff --git a/updates/version.yaml b/updates/version.yaml index fd0309345..e4eb7441f 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -625,3 +625,5 @@ v3.5.11: - 'Various small bugfixes' v3.5.12: - 'Various small additions (thanks to @RickAcb and @rubenvanerk)' +v3.5.13: + - 'Fixed RainLab.User v3 compatibility'