I have the following code in a custom module as well as I have firePHP installed (dfb($userId) is supposed to be written in the console). At every page pageload I want to catch and print the current users ID and I think the following should work but it isn't - can anyone tell me why?
function live_update_test_init() {
global $user;
$userId = $user->uid;
dfb($userId);
// Tell drupal that we should watch for new
if (arg(0) == 'frontpage' && !arg(1)) {
live_update_initialize('live-update-test');
}
}