Meteor.validateEmail -> Accounts.validateEmail

This commit is contained in:
Nick Martin
2012-10-01 16:20:57 -07:00
parent dd640729ff
commit ccb79ff0d9
3 changed files with 5 additions and 5 deletions

View File

@@ -96,7 +96,7 @@
getValidateEmailToken(email2, test, expect);
},
function (test, expect) {
Meteor.validateEmail(validateEmailToken, expect(function(error) {
Accounts.validateEmail(validateEmailToken, expect(function(error) {
test.isFalse(error);
}));
// ARGH! ON QUIESCE!!
@@ -124,7 +124,7 @@
getValidateEmailToken(email3, test, expect);
},
function (test, expect) {
Meteor.validateEmail(validateEmailToken, expect(function(error) {
Accounts.validateEmail(validateEmailToken, expect(function(error) {
test.isFalse(error);
}));
},

View File

@@ -168,7 +168,7 @@
//
// @param token {String}
// @param callback (optional) {Function(error|undefined)}
Meteor.validateEmail = function(token, callback) {
Accounts.validateEmail = function(token, callback) {
if (!token)
throw new Error("Need to pass token");

View File

@@ -474,10 +474,10 @@
// Needs to be in Meteor.startup because of a package loading order
// issue. We can't be sure that accounts-password is loaded earlier
// than accounts-ui so Meteor.validateEmail might not be defined.
// than accounts-ui so Accounts.validateEmail might not be defined.
Meteor.startup(function () {
if (Accounts._validateEmailToken) {
Meteor.validateEmail(Accounts._validateEmailToken, function(error) {
Accounts.validateEmail(Accounts._validateEmailToken, function(error) {
Accounts._enableAutoLogin();
if (!error)
Session.set(JUST_VALIDATED_USER_KEY, true);