I have a site with a large number of modules (100+) installed and I have an issue with my rules firing twice, which appears to be caused by
user_save() being called twice. (I was able to confirm this by adding a
user_save(), which is printed to the screen twice on my dev site when I log in as an authenticated user and update that user's profile.
Now I'd like to find which contrib module is caused
user_save() to be called twice (of course this assumes it is a contrib module). I'm not a developer so I'm getting stuck. I have Netbeans set up with Xdebug and I set a breakpoint on
user_save(). Then I started the debugger and logged in and updated a user account, but when I look at the call stack I see the following:
And then when
user_save() is called again (in the same page load) I see exactly the same output. If it is a contrib module that is causing
user_save() to be called twice, how can I find out which one it is?
watchdog('debug', '<pre>' . print_r(debug_backtrace(), TRUE) . '</pre>');into an implementation of
hook_user_update()might be a good start, it should give you a trace of what functions were called for each run up to
user_save(). Analysing that should give you an idea of what's instigating the calls at least
hook_user_update(). However, I had to enable syslog because it overloaded the watchdog reports screen; a single save of a user profile generated 685033 lines of text in the syslog file. Is there some way to look at the file and get meaningful information, because there's no way I can read a half million lines of text...