I made /extensions/users-permissions/strapi-server.js
and:
"use strict";
module.exports = (plugin) => {
plugin.controllers.user.findOne = async (ctx) => {
return { test: "test" };
};
return plugin;
};
It doesn’t work.
I also tried /extensions/users-permissions/controllers/auth.js , nothing works.
This topic has been created from a Discord post (1287488032143835176) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
Yo! I have the same problem! Do you have any solution?
Ok, I have a solution!
The extension of the users-permissions plugin is identical to v4.
However, what is not said is in v4 there is a strapi-server.js file at the root of the plugin and in v5 there is none (in the sources!). But to make your extension work you still have to add this strapi-server.js file:
'use strict';
module.exports = require('./server');
Another negative point, which is not mentioned: it is no longer possible to do require('@strapi/plugin-users-permissions/server/...'); because the files are not in the exports of the plugin’s package.json…
This is a problem since it forces me to rewrite the entire server/ plugin when I only have a few files to edit…
Maybe some <@&812004048591913010> have ideas or can report the problem ? And add it in doc ? 
What do you think the moderator role is for?
You can do that from bootstrap