Hello Diego and Xavi,
You can use the onUserAfterSave event of joomla.
Have a look at the user plugins in the /plugins/user directory there you will find for example the /joomla/joomla.php that will serve you as an example of the implementation of the onUserAfterSave event.
Then make your own user plugin for the onUserAfterSaveEvent, below is an example:
Hope this helps, Joris from Pampaneira
defined('_JEXEC') or die;
class PlgUserBootstrapv2 extends JPlugin
{
public function onUserAfterSave($user, $isnew, $success, $msg) {
if ($isnew) {
$jinput = JFactory::getApplication()->input;
$jinput->set('return', base64_encode(JURI::base(). 'newuserredirect'));
}
else {
// Existing user - nothing to do...yet, we use normal redirect.
}
}
}