Drain the tofu, pat-dry then cut it into 2cm cubes.
Mix the oil, turmeric, cayenne and soy, then toss the tofu with this mixture and set aside.
Finely cop the onion and garlic. Heat the oil in a large frying pan and gently sauté the onion and garlic.
Add the spices, stir for a minute then add the tomatoes. Put the lid on and gently sauté for a few minutes, until the tomatoes have softened a bit.
Add the beans and corn kernels. Cook for a minute then stir in the cooked rice. Cook over low heat and covered for a few minutes to warm through. Turn off the heat, keep the rice mixture covered.
Meanwhile, heat some oil in another frying pan and cook the tofu on each side - this should take about 5 minutes.
Add the coriander leaves and tofu to the rice mixture, season with salt and pepper to your liking, then gently toss.