Some code simplifications.

This commit is contained in:
James Cole
2016-04-28 16:30:21 +02:00
parent e28e66e8f1
commit ea014a6504
5 changed files with 30 additions and 25 deletions

View File

@@ -69,14 +69,13 @@ class ConfirmationController extends Controller
$now = time();
$maxDiff = config('firefly.resend_confirmation');
$owner = env('SITE_OWNER', 'mail@example.com');
$view = 'auth.confirmation.no-resent';
if ($now - $time > $maxDiff) {
event(new ResendConfirmation(Auth::user(), $request->ip()));
return view('auth.confirmation.resent', ['owner' => $owner]);
} else {
return view('auth.confirmation.no-resent', ['owner' => $owner]);
$view = 'auth.confirmation.resent';
}
return view($view, ['owner' => $owner]);
}
}