| @@ 89-99 (lines=11) @@ | ||
| 86 | if ($form->isSubmitted() && $form->isValid()) { |
|
| 87 | log_info('会員編集開始'); |
|
| 88 | ||
| 89 | if ($Customer->getPassword() === $this->eccubeConfig['eccube_default_password']) { |
|
| 90 | $Customer->setPassword($previous_password); |
|
| 91 | } else { |
|
| 92 | $encoder = $this->encoderFactory->getEncoder($Customer); |
|
| 93 | if ($Customer->getSalt() === null) { |
|
| 94 | $Customer->setSalt($encoder->createSalt()); |
|
| 95 | } |
|
| 96 | $Customer->setPassword( |
|
| 97 | $encoder->encodePassword($Customer->getPassword(), $Customer->getSalt()) |
|
| 98 | ); |
|
| 99 | } |
|
| 100 | $this->entityManager->flush(); |
|
| 101 | ||
| 102 | log_info('会員編集完了'); |
|
| @@ 96-104 (lines=9) @@ | ||
| 93 | ||
| 94 | $encoder = $this->encoderFactory->getEncoder($Customer); |
|
| 95 | ||
| 96 | if ($Customer->getPassword() === $this->eccubeConfig['eccube_default_password']) { |
|
| 97 | $Customer->setPassword($previous_password); |
|
| 98 | } else { |
|
| 99 | if ($Customer->getSalt() === null) { |
|
| 100 | $Customer->setSalt($encoder->createSalt()); |
|
| 101 | $Customer->setSecretKey($this->customerRepository->getUniqueSecretKey()); |
|
| 102 | } |
|
| 103 | $Customer->setPassword($encoder->encodePassword($Customer->getPassword(), $Customer->getSalt())); |
|
| 104 | } |
|
| 105 | ||
| 106 | $this->entityManager->persist($Customer); |
|
| 107 | $this->entityManager->flush(); |
|