[FIX] User can resend email verification if email is invalid or is empty (#16095)

pull/17918/head^2
Ashwani Yadav 5 years ago committed by GitHub
parent 19781efb7f
commit 1b10d804ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/ui-account/client/accountProfile.html
  2. 7
      app/ui-account/client/accountProfile.js

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

@ -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');
},

Loading…
Cancel
Save