afterCreate in user-permissions plugin

Now I’ve tried the following in ./extensions/user-permissions/models/User.js:

'use strict';

/**
 * Lifecycle callbacks for the `User` model.
 */

module.exports = {
  lifecycles: {
    async beforeCreate(data) {
      console.log(data);
    },
    async afterCreate(result, data) {
      console.log(result);
    },
  }
};

But there’s no log. I think the file will not be executed.

1 Like