Merge pull request #6493 from ShadowJonathan/fix-profile-saving

Make sure profile saving has a clear error when email is not verified
pull/6524/head
dansup 4 months ago committed by GitHub
commit bdc203dc5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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