Make sure profile saving has a clear error when email is not verified

pull/6493/head
Jonathan de Jong 5 months ago
parent a73bbb12e2
commit 8e91918b88
No known key found for this signature in database

@ -60,7 +60,7 @@ trait HomeSettings
$enforceEmailVerification = config_cache('pixelfed.enforce_email_verification');
// Only allow email to be updated if not yet verified
if (! $enforceEmailVerification || ! $changes && $user->email_verified_at) {
if (! $enforceEmailVerification || $user->email_verified_at) {
if ($profile->name != $name) {
$changes = true;
$user->name = $name;
@ -92,6 +92,8 @@ trait HomeSettings
PronounService::put($profile->id, $pronouns);
}
}
} else {
return redirect('/settings/home')->with('status', 'Verify your email address before you can update your profile!');
}
if ($changes === true) {

Loading…
Cancel
Save