CreateMany bulk operation passwords encryption?

System Information
  • Strapi Version: v4.3.2
  • Operating System:
  • Database: SQLite
  • Node Version: v16.14.2
  • NPM Version: 8.7.0
  • Yarn Version: 1.22.5

Hi, i’m using the strapi.db.query.createMany and lifecyle to create account and one thing i noticed,is that the passwords are not getting encrypted.


async createMany(ctx){
		let body =;
		var entries;

		if(!Array.isArray(body)){//Se uma array não for enviada, dar erro
			return ctx.badRequest(
				"No array detected" ,"Be sure that the you send an array with the info of the users to create."
		}else{//Se for array, criar
			entries = await strapi.db.query('plugin::users-permissions.user').createMany({


		return ctx.send(entries)

What i should do?
In the lifecycle hash the password (i think this is not the best option) or there is another solution to encrypt the passwords?