I'm using Rules module to execute a python script after a user has been created / updated. This python script retrieves information of users from the database and feeds a datapushing / realtime data engine.
Everything works perfect, BUT, the script is executing before saving.
Update regarding 'script is executing before saving'
When I get the information from the DB with the python script is the one I have before saving, the only workaround is saving twice. One to make changes, to second one to 'really' update. I've noticed this because I need to save twice to get real information.
I found this issue: http://drupal.org/node/430274
I thought on running the script in Drupal's User Core but good practices kind of don't let me do it ( for now :) )
Update
I created a Module with this Info
<?php
// $Id: infographic.module
/**
* @file
* Custom functions for this site.
*/
function infographic_user_insert(&$edit, $account, $category) {
exec('python GenerateInfographic.py');
}
function infographic_user_update(&$edit, $account, $category) {
exec('python GenerateInfographic.py');
}
Any Suggestion!?
Thanks!