Override "auth.js" and "user.js" (in "controllers") within "plugin-users-permissions" completely 🤔

System Information
  • Strapi Version: 4.21.1
  • Operating System: Heroku
  • Database: PostgreSQL
  • Node Version: 18.20.0
  • NPM Version: >=6.0.0

Hello guys,

I have extensively modified the files “auth.js” and “user.js” (in “controllers”) within “plugin-users-permissions”, and I have bound them via “strapi-server.js”.

image

Here are the two files with which I want to completely override the system functions:

image

But the program is not running yet because the following two lines are not functioning:

image

Could someone perhaps give me a tip on how to write this part correctly? :thinking:

Many thanks in advance!

I solved the problem myself by copying and adding more files from the original.

1 Like

Hey @mingxi
thanks for your solution. I tried to follow your steps but with no luck can you shared detailed files of the overriten files :smiley:
thank you

1 Like

I haven’t been here for a while, but I’m back now. Have you been able to solve the problem in the meantime?