| @@ 164-171 (lines=8) @@ | ||
| 161 | $this->entityManager->persist($CustomerAddress); |
|
| 162 | } |
|
| 163 | ||
| 164 | if ($Customer->getPassword() === $this->appConfig['default_password']) { |
|
| 165 | $Customer->setPassword($previous_password); |
|
| 166 | } else { |
|
| 167 | if ($Customer->getSalt() === null) { |
|
| 168 | $Customer->setSalt($encoder->createSalt()); |
|
| 169 | } |
|
| 170 | $Customer->setPassword($encoder->encodePassword($Customer->getPassword(), $Customer->getSalt())); |
|
| 171 | } |
|
| 172 | ||
| 173 | $this->entityManager->persist($Customer); |
|
| 174 | $this->entityManager->flush(); |
|
| @@ 127-137 (lines=11) @@ | ||
| 124 | ||
| 125 | log_info('会員編集開始'); |
|
| 126 | ||
| 127 | if ($Customer->getPassword() === $this->appConfig['default_password']) { |
|
| 128 | $Customer->setPassword($previous_password); |
|
| 129 | } else { |
|
| 130 | $encoder = $this->encoderFactory->getEncoder($Customer); |
|
| 131 | if ($Customer->getSalt() === null) { |
|
| 132 | $Customer->setSalt($encoder->createSalt()); |
|
| 133 | } |
|
| 134 | $Customer->setPassword( |
|
| 135 | $encoder->encodePassword($Customer->getPassword(), $Customer->getSalt()) |
|
| 136 | ); |
|
| 137 | } |
|
| 138 | $this->entityManager->flush(); |
|
| 139 | ||
| 140 | log_info('会員編集完了'); |
|