| @@ 316-327 (lines=12) @@ | ||
| 313 | * @param $app |
|
| 314 | * @return string |
|
| 315 | */ |
|
| 316 | public function getUniqueSecretKey($app) |
|
| 317 | { |
|
| 318 | $unique = Str::random(32); |
|
| 319 | $Customer = $app['eccube.repository.customer']->findBy(array( |
|
| 320 | 'secret_key' => $unique, |
|
| 321 | )); |
|
| 322 | if (count($Customer) == 0) { |
|
| 323 | return $unique; |
|
| 324 | } else { |
|
| 325 | return $this->getUniqueSecretKey($app); |
|
| 326 | } |
|
| 327 | } |
|
| 328 | ||
| 329 | /** |
|
| 330 | * ユニークなパスワードリセットキーを返す |
|
| @@ 334-345 (lines=12) @@ | ||
| 331 | * @param $app |
|
| 332 | * @return string |
|
| 333 | */ |
|
| 334 | public function getUniqueResetKey($app) |
|
| 335 | { |
|
| 336 | $unique = Str::random(32); |
|
| 337 | $Customer = $app['eccube.repository.customer']->findBy(array( |
|
| 338 | 'reset_key' => $unique, |
|
| 339 | )); |
|
| 340 | if (count($Customer) == 0) { |
|
| 341 | return $unique; |
|
| 342 | } else { |
|
| 343 | return $this->getUniqueResetKey($app); |
|
| 344 | } |
|
| 345 | } |
|
| 346 | ||
| 347 | /** |
|
| 348 | * saltを生成する |
|