mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Meteor.validateEmail -> Accounts.validateEmail
This commit is contained in:
@@ -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);
|
||||
}));
|
||||
},
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user