On the event 'after saving a new user account' based on a certain condition, if i try to unblock or assign a role to a user at the same time, it results in a db exception being thrown:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '27-4' for key 'PRIMARY': INSERT INTO {users_roles} (uid, rid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 27 [:db_insert_placeholder_1] => 4 ) in user_save() (line 595 of C:\xampp\htdocs\spots\modules\user\user.module).
If i just keep it to a single action, both the rules work fine.
It seems that for some reason the insertion query as referenced by the error is run twice or more, for adding an exit() after the 'query->excecute()' created a user with both the actions processed.