Skip to content

Commit 1d4e762

Browse files
committed
MBS-11507: Remove useless resend-verification code
The whole resend-verification code was added in 2011 (MBS-3188) apparently under the incorrect assumption that we store the email a user has entered before it gets verified. In fact, we only store it as part of the verification process - so there's no possible case where we would have an email stored that still needs verifying. The entirety of the resend-verification code is as such completely useless, since there's no reason to re-verify an already verified email address (even though that's what the Reverify test was testing).
1 parent 5399609 commit 1d4e762

File tree

5 files changed

+3
-75
lines changed

5 files changed

+3
-75
lines changed

lib/MusicBrainz/Server/Controller/Account.pm

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -621,23 +621,6 @@ sub register : Path('/register') ForbiddenOnMirrors RequireSSL DenyWhenReadonly
621621
);
622622
}
623623

624-
=head2 resend_verification
625-
626-
Send out an email allowing users to verify their email address, from the web
627-
628-
=cut
629-
630-
sub resend_verification : Path('/account/resend-verification') ForbiddenOnMirrors RequireAuth
631-
{
632-
my ($self, $c) = @_;
633-
my $editor = $c->model('Editor')->get_by_id($c->user->id);
634-
if ($editor->has_email_address) {
635-
$self->_send_confirmation_email($c, $editor, $editor->email);
636-
}
637-
$c->response->redirect($c->uri_for_action('/user/profile', [ $editor->name ]));
638-
$c->detach;
639-
}
640-
641624
=head2 _send_confirmation_email
642625
643626
Send out an email allowing users to verify their email address

lib/MusicBrainz/Server/Controller/User.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@ sub _check_for_confirmed_email {
300300
component_path => 'user/UserMessage',
301301
component_props => {
302302
title => l('Send Email'),
303-
message => l('You cannot contact other users because you have not {url|verified your email address}.',
304-
{url => $c->uri_for_action('/account/resend_verification')}),
303+
message => l('You cannot contact other users because you do not have a verified email address.'),
305304
},
306305
current_view => 'Node',
307306
);

root/user/UserProfile.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,10 @@ const UserProfileInformation = ({
198198
{noEmailWarning}
199199
</>
200200
)}
201-
{' '}
202-
{viewingOwnProfile ? (
203-
bracketed(
204-
<a href="/account/resend-verification">
205-
{l('resend verification email')}
206-
</a>,
207-
)
208-
) : (
201+
{viewingOwnProfile ? null : (
209202
$c.user && !isAddingNotesDisabled($c.user) ? (
210203
<>
204+
{' '}
211205
{bracketed(
212206
<a href={`/user/${encodedName}/contact`}>
213207
{l('send email')}

t/lib/t/MusicBrainz/Server/Controller/UnconfirmedEmailAddresses.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ test 'Paths that allow browsing without a confirmed email address' => sub {
6565
'Controller::Account::register',
6666
'Controller::Account::register_application',
6767
'Controller::Account::remove_application',
68-
'Controller::Account::resend_verification',
6968
'Controller::Account::reset_password',
7069
'Controller::Account::revoke_application_access',
7170
'Controller::Account::verify_email',

t/lib/t/MusicBrainz/Server/Controller/User/Reverify.pm

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)