hi, i am experiencing a weird issue, it may be down to something in my code but im not sure, heres the prob.
i have a custom module which fires off a hook_menu(). the callback function adds a new user role to the $account object using user_multiple_role_edit() which goes through user_save().
i have a rule which acts upon user account change and creates a couple of nodes for the user if they have a certain role (the one im assigning).
I want to load those nodes straight after i add the user role to the account in the callback function. if i try to do a node_load() on the node it returns empty. however, if i refresh again the nodes will be loaded (so the rule is actually working).
this leads me to think the rule is not firing quick enough. I have set the weight of my module to greater than the rules module, so it will run after it, but still no such luck. Any ideas??
Comments
Comment #1
fagoPerhaps node_load() has cached old results? Anyway, I don't see what rules should be doing wrong here.
Comment #2
mitchell commentedMarking as fixed due to inactivity.