LT-196: Add verifyEmail property under public property in settings.json to control emailVerification template
- Add mailServerSettings in settings.json
This commit is contained in:
1 parent
813c68881a
commit
c5651e7e04
5 files changed
+55
-43
No files matched your search
+13
-8
@@ -24,15 +24,20 @@ Template.lesionTrackerLayout.helpers({
|
||||
},
|
||||
|
||||
currentUser: function() {
|
||||
if (Meteor.user() && Meteor.userId()) {
|
||||
if (Session.get("verifyEmail")) {
|
||||
if (Meteor.user().emails[0].verified) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var verifyEmail = Meteor.settings && Meteor.settings.public && Meteor.settings.public.verifyEmail || false;
|
||||
|
||||
if (!Meteor.user() || !Meteor.userId()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!verifyEmail) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Meteor.user().emails[0].verified) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -44,7 +49,7 @@ Template.lesionTrackerLayout.onCreated(function() {
|
||||
// Show countdown dialog
|
||||
var handle;
|
||||
$(document).on('TriggerOpenTimeoutCountdownDialog', function(e, leftTime) {
|
||||
// TODO: Show modal dialog
|
||||
// Show modal dialog
|
||||
handle = setInterval(function() {
|
||||
leftTime--;
|
||||
// Set countdownDialogLeftTime session
|
||||
|
||||
Reference in new issue
Block a user