Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/Http/Controllers/Api/V1/AffiliationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ public function verifyEmail(VerificationEmail $request, string $verificationCode
'is_verified' => 0,
'current_employer' => 1,
])
->where('verification_sent_at', '>=', now()->subMinutes((int)config('speedi.system.otp_affiliation_validity_minutes')))
->first();

if (is_null($affiliation)) {
Expand Down
2 changes: 0 additions & 2 deletions app/TriggerEmail/TriggerEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,11 @@ public function spawnEmail(array $input): void
'email' => $affiliation->email,
];

$validationHours = round((int)config('speedi.system.otp_affiliation_validity_minutes') / 60, 0);
$replacements = [
'[[env(SUPPORT_EMAIL)]]' => config('speedi.system.support_email'),
'[[env(APP_NAME)]]' => config('speedi.system.app_name'),
'[[env(REGISTRY_IMAGE_URL)]]' => config('speedi.system.registry_image_url'),
'[[AFFILIATION_VERIFICATION_PATH]]' => config('speedi.system.portal_url') . '/user/profile/affiliations?verify=' . $affiliation->verification_code,
'[[env(OTP_AFFILIATION_VALIDITY_HOURS)]]' => $validationHours,
];

break;
Expand Down
2 changes: 0 additions & 2 deletions database/seeders/EmailTemplatesSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1032,8 +1032,6 @@ public function run(): void
A Safe People Registry affiliation has been made with this email address. If this was you, click the link below to verify your email address.
If you didn\'t create this account, please contact us at [[env(SUPPORT_EMAIL)]] so that we can follow up.
<div><br></div>
This link will expire within [[env(OTP_VALIDITY_HOURS)]] hours.
<div><br></div>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict still out on whether this needs sorting or not, so I will defer to Wendi's decision on whether we keep the expiration in. But, this won't work, as this updates only the seeder, not the rows in the db, which would need to be updated via migration to update the template data.

We would only run the seeders again on dev and potentially preprod, but never prod.

' . $this->supportFooter . '
</mj-text>
</mj-column>
Expand Down