@@ 575-582 (lines=8) @@ | ||
572 | throw new \UnexpectedValueException('the link is not exists.', -10018); |
|
573 | } |
|
574 | ||
575 | if ($reset_code->invalid_flag == 1) { |
|
576 | throw new \UnexpectedValueException('the link has been invalid.', -10020); |
|
577 | } |
|
578 | else if ($reset_code->expired_at < time()) { |
|
579 | throw new \UnexpectedValueException('the link has been expired.', -10017); |
|
580 | } |
|
581 | ||
582 | $email = $reset_code->email; |
|
583 | $user = Sentinel::findByCredentials([ 'email' => $email ]); |
|
584 | if (!$user) { |
|
585 | throw new \UnexpectedValueException('the user is not exists.', -10010); |
|
@@ 620-627 (lines=8) @@ | ||
617 | throw new \UnexpectedValueException('the link is not exists.', -10018); |
|
618 | } |
|
619 | ||
620 | if ($reset_code->invalid_flag == 1) { |
|
621 | throw new \UnexpectedValueException('the link has been invalid.', -10020); |
|
622 | } |
|
623 | else if ($reset_code->expired_at < time()) { |
|
624 | throw new \UnexpectedValueException('the link has been expired.', -10017); |
|
625 | } |
|
626 | ||
627 | $email = $reset_code->email; |
|
628 | $user = Sentinel::findByCredentials([ 'email' => $email ]); |
|
629 | if (!$user) { |
|
630 | throw new \UnexpectedValueException('the user is not exsits.', -10010); |