|
|
|
@ -2,7 +2,6 @@
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
const nconf = require('nconf');
|
|
|
|
|
const winston = require('winston');
|
|
|
|
|
|
|
|
|
|
const user = require('./index');
|
|
|
|
|
const utils = require('../utils');
|
|
|
|
@ -88,12 +87,6 @@ UserEmail.sendValidationEmail = async function (uid, options) {
|
|
|
|
|
return confirm_code;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
UserEmail.confirm = async function (code) {
|
|
|
|
|
// TODO: remove in 1.17.0
|
|
|
|
|
winston.warn('[deprecated] User.email.confirm deprecated use User.email.confirmByCode');
|
|
|
|
|
await UserEmail.confirmByCode(code);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// confirm email by code sent by confirmation email
|
|
|
|
|
UserEmail.confirmByCode = async function (code) {
|
|
|
|
|
const confirmObj = await db.getObject('confirm:' + code);
|
|
|
|
|