diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-02-19 23:31:23 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-02-20 09:43:06 +0000 |
| commit | d97083fe315dad9b7d0a150d4fb5f563e57d1869 (patch) | |
| tree | b4be67a05b132d458fc4b3e6922ab9575b54b8d4 /app/Services/UserService.php | |
| parent | 5fef3bfa81d4556f7a2fb3cea6c71a6306d21812 (diff) | |
| download | webtrees-d97083fe315dad9b7d0a150d4fb5f563e57d1869.tar.gz webtrees-d97083fe315dad9b7d0a150d4fb5f563e57d1869.tar.bz2 webtrees-d97083fe315dad9b7d0a150d4fb5f563e57d1869.zip | |
Create Timestamp class and factory to replace direct-dependency on Carbon
Diffstat (limited to 'app/Services/UserService.php')
| -rw-r--r-- | app/Services/UserService.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 844cc9eee4..c660689da1 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -21,7 +21,6 @@ namespace Fisharebest\Webtrees\Services; use Closure; use Fisharebest\Webtrees\Auth; -use Fisharebest\Webtrees\Carbon; use Fisharebest\Webtrees\Contracts\UserInterface; use Fisharebest\Webtrees\Registry; use Fisharebest\Webtrees\Http\RequestHandlers\ContactPage; @@ -37,6 +36,7 @@ use Psr\Http\Message\ServerRequestInterface; use function assert; use function max; +use function time; /** * Functions for managing users. @@ -128,7 +128,7 @@ class UserService ->where('us1.setting_value', '=', $token) ->join('user_setting AS us2', 'us2.user_id', '=', 'user.user_id') ->where('us2.setting_name', '=', 'password-token-expire') - ->where('us2.setting_value', '>', Carbon::now()->getTimestamp()) + ->where('us2.setting_value', '>', time()) ->select(['user.*']) ->get() ->map(User::rowMapper()) |
