Skip to content

Commit

Permalink
[FIX] User can resend email verification if email is invalid or is em…
Browse files Browse the repository at this point in the history
…pty (#16095)
  • Loading branch information
ashwaniYDV authored Jun 19, 2020
1 parent 19781ef commit 1b10d80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/ui-account/client/accountProfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
{{/unless}}
{{#unless emailVerified}}
<div class="rc-input__error">
<button class="rc-button rc-button--small" id="resend-verification-email">{{_ "Resend_verification_email"}}</button>
<button class="rc-button rc-button--small" id="resend-verification-email" {{canResendEmailConf 'disabled'}}>{{_ "Resend_verification_email"}}</button>
</div>
{{/unless}}
</div>
Expand Down
7 changes: 7 additions & 0 deletions app/ui-account/client/accountProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ Template.accountProfile.helpers({
return ret;
}
},
canResendEmailConf(ret) {
const email = Template.instance().email.get();
const user = Meteor.user();
if (getUserEmailAddress(user) && getUserEmailAddress(user) !== email) {
return ret;
}
},
allowDeleteOwnAccount() {
return settings.get('Accounts_AllowDeleteOwnAccount');
},
Expand Down

0 comments on commit 1b10d80

Please sign in to comment.