chore: remove deprecated `User.emailConfirm` [breaking]

Use `User.email.confirmByCode` instead.
v1.18.x
Julian Lam 4 years ago
parent 5a775e09dc
commit fb84c78544

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

Loading…
Cancel
Save