Is there a way to register a user in strapi with confirmation: true?

Is it posibile? If I can, how? I want to do this from my controller.

I thought this was default if you do not provide it. Also when registering you can always pass it as an extra parm ?
I got in my app it without any email confirmation and then it defaults to be true

Hey, @Ionut_Popa if you wanna make your changes on the controller level you will need to overwrite the files created by strapi when the project runs. This can be done for the registration controller by creating this file structure in your codebase.

Folder Structure:


and inside this Auth.js file, you will have to add the async register function this function gets called when you register a new user. You can find the default method in Strapi’s GitHub repo and modify it to meet your requirement. Github Auth file Link

If you wanna modify another controller make sure you follow the same folder structure Strapi has in the repo. it has a few differences but it’s follows the same structure for all the different controllers.

GitHub repo:

Our code folder structure:

extensions \ users-permissions \ controllers \ Auth.js

I will recommend you to check out GitHub and dig around the code to find how to modify any other default controllers.

Hope this helps :slight_smile:.


Thanks. There was a object named params, all I had to add was params.confirmed = true

1 Like