| @@ 311-319 (lines=9) @@ | ||
| 308 | * |
|
| 309 | * @return string |
|
| 310 | */ |
|
| 311 | public function getUniqueSecretKey() |
|
| 312 | { |
|
| 313 | do { |
|
| 314 | $key = Str::random(32); |
|
| 315 | $Customer = $this->findOneBy(['secret_key' => $key]); |
|
| 316 | } while ($Customer); |
|
| 317 | ||
| 318 | return $key; |
|
| 319 | } |
|
| 320 | ||
| 321 | /** |
|
| 322 | * ユニークなパスワードリセットキーを返す |
|
| @@ 326-334 (lines=9) @@ | ||
| 323 | * |
|
| 324 | * @return string |
|
| 325 | */ |
|
| 326 | public function getUniqueResetKey() |
|
| 327 | { |
|
| 328 | do { |
|
| 329 | $key = Str::random(32); |
|
| 330 | $Customer = $this->findOneBy(['reset_key' => $key]); |
|
| 331 | } while ($Customer); |
|
| 332 | ||
| 333 | return $key; |
|
| 334 | } |
|
| 335 | ||
| 336 | /** |
|
| 337 | * 仮会員をシークレットキーで検索する. |
|