Skip to content

Commit 7af808f

Browse files
authored
Merge pull request #65 from ImJustToNy/patch-1
fix: WelcomesNewUsers
2 parents 888f5a6 + 16bc1ca commit 7af808f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Http/Middleware/WelcomesNewUsers.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public function handle($request, Closure $next)
1414
abort(Response::HTTP_FORBIDDEN, __mc('The welcome link does not have a valid signature or is expired.'));
1515
}
1616

17-
if (! $request->mailcoachUser) {
17+
if (! $request->user) {
1818
abort(Response::HTTP_FORBIDDEN, __mc('Could not find a user to be welcomed.'));
1919
}
2020

21-
if (is_null($request->mailcoachUser->welcome_valid_until)) {
21+
if (is_null($request->user->welcome_valid_until)) {
2222
abort(Response::HTTP_FORBIDDEN, __mc('The welcome link has already been used.'));
2323
}
2424

25-
if (Carbon::create($request->mailcoachUser->welcome_valid_until)->isPast()) {
25+
if (Carbon::create($request->user->welcome_valid_until)->isPast()) {
2626
abort(Response::HTTP_FORBIDDEN, __mc('The welcome link has expired.'));
2727
}
2828

0 commit comments

Comments
 (0)