Customize Strapi users permissions services

Hey @samasarin,

To overwrite plugins you can use extensions. By copying ./node_modules/strapi-plugin-users-permissions/services/User.js to ./extensions/users-permissions/services/User.js and removing all the unused functions you can modify the senConfirmationEmail.

For example you will get:

'use strict';

const crypto = require('crypto');
const { sanitizeEntity, getAbsoluteServerUrl } = require('strapi-utils');

module.exports = {
  async sendConfirmationEmail(user) {
    // ...
  },
};

(Do note the warning in the docs about use extensions and upgrading your strapi version :warning:)

Good luck!

1 Like