Answers for "send confirmation email strapi"

0

send confirmation email in strapi

async sendConfirmationEmail(user) {
  const userPermissionService = strapi.plugins['users-permissions'].services.userspermissions;
  const pluginStore = await strapi.store({
    environment: '',
    type: 'plugin',
    name: 'users-permissions',
  });

  const settings = await pluginStore
    .get({ key: 'email' })
    .then(storeEmail => storeEmail['email_confirmation'].options);

  const userInfo = sanitizeEntity(user, {
    model: strapi.query('user', 'users-permissions').model,
  });

  const confirmationToken = crypto.randomBytes(20).toString('hex');

  await this.edit({ id: user.id }, { confirmationToken });
Posted by: Guest on August-08-2021
0

send confirmation email strapi

await strapi.plugins["users-permissions"].services.user.sendConfirmationEmail(user);
Posted by: Guest on October-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language