File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
app/code/Magento/Customer/Controller/Account Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -349,15 +349,14 @@ public function execute()
349
349
$ confirmation = $ this ->getRequest ()->getParam ('password_confirmation ' );
350
350
$ redirectUrl = $ this ->session ->getBeforeAuthUrl ();
351
351
$ this ->checkPasswordConfirmation ($ password , $ confirmation );
352
+
353
+ $ extensionAttributes = $ customer ->getExtensionAttributes ();
354
+ $ extensionAttributes ->setIsSubscribed ($ this ->getRequest ()->getParam ('is_subscribed ' , false ));
355
+ $ customer ->setExtensionAttributes ($ extensionAttributes );
356
+
352
357
$ customer = $ this ->accountManagement
353
358
->createAccount ($ customer , $ password , $ redirectUrl );
354
359
355
- if ($ this ->getRequest ()->getParam ('is_subscribed ' , false )) {
356
- $ extensionAttributes = $ customer ->getExtensionAttributes ();
357
- $ extensionAttributes ->setIsSubscribed (true );
358
- $ customer ->setExtensionAttributes ($ extensionAttributes );
359
- $ this ->customerRepository ->save ($ customer );
360
- }
361
360
$ this ->_eventManager ->dispatch (
362
361
'customer_register_success ' ,
363
362
['account_controller ' => $ this , 'customer ' => $ customer ]
You can’t perform that action at this time.
0 commit comments