Skip to content

Commit fe0c7f0

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 f776759 commit fe0c7f0

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
@@ -617,23 +617,6 @@ sub register : Path('/register') ForbiddenOnSlaves RequireSSL DenyWhenReadonly S
617617
);
618618
}
619619

620-
=head2 resend_verification
621-
622-
Send out an email allowing users to verify their email address, from the web
623-
624-
=cut
625-
626-
sub resend_verification : Path('/account/resend-verification') ForbiddenOnSlaves RequireAuth
627-
{
628-
my ($self, $c) = @_;
629-
my $editor = $c->model('Editor')->get_by_id($c->user->id);
630-
if ($editor->has_email_address) {
631-
$self->_send_confirmation_email($c, $editor, $editor->email);
632-
}
633-
$c->response->redirect($c->uri_for_action('/user/profile', [ $editor->name ]));
634-
$c->detach;
635-
}
636-
637620
=head2 _send_confirmation_email
638621
639622
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
@@ -297,8 +297,7 @@ sub _check_for_confirmed_email {
297297
component_path => 'user/UserMessage',
298298
component_props => {
299299
title => l('Send Email'),
300-
message => l('You cannot contact other users because you have not {url|verified your email address}.',
301-
{url => $c->uri_for_action('/account/resend_verification')}),
300+
message => l('You cannot contact other users because you do not have a verified email address.'),
302301
},
303302
current_view => 'Node',
304303
);

root/user/UserProfile.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,10 @@ const UserProfileInformation = ({
195195
{noEmailWarning}
196196
</>
197197
)}
198-
{' '}
199-
{viewingOwnProfile ? (
200-
bracketed(
201-
<a href="/account/resend-verification">
202-
{l('resend verification email')}
203-
</a>,
204-
)
205-
) : (
198+
{viewingOwnProfile ? null : (
206199
$c.user ? (
207200
<>
201+
{' '}
208202
{bracketed(
209203
<a href={`/user/${encodedName}/contact`}>
210204
{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
@@ -72,7 +72,6 @@ test 'Paths that allow browsing without a confirmed email address' => sub {
7272
'Controller::Account::register',
7373
'Controller::Account::register_application',
7474
'Controller::Account::remove_application',
75-
'Controller::Account::resend_verification',
7675
'Controller::Account::reset_password',
7776
'Controller::Account::revoke_application_access',
7877
'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)