Skip to content

Commit f044eb1

Browse files
author
Mark Berube
committed
MC-40099: Changing groupId functionality on createAccount()
1 parent 10fd2c9 commit f044eb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,8 @@ public function getConfirmationStatus($customerId)
849849
*/
850850
public function createAccount(CustomerInterface $customer, $password = null, $redirectUrl = '')
851851
{
852-
if ($customer->getGroupId() && !$this->authorization->isAllowed(self::ADMIN_RESOURCE)) {
852+
$groupId = $customer->getGroupId();
853+
if ($groupId && $groupId !== 0 && !$this->authorization->isAllowed(self::ADMIN_RESOURCE)) {
853854
$customer->setGroupId(null);
854855
}
855856

0 commit comments

Comments
 (0)