It's been a week I have played around with drupal 7. With drupal 6, I used to be able to place (login) block anywhere with this:
$block = (object) module_invoke($module, 'block', 'view', $delta);
$block->module = $module;
$block->delta = $delta;
return theme('block', $block);
or this:
$block = module_invoke('user', 'block', 'view', 0);
$vars['login'] = $block['content'];
I changed the delta '0' for Drupal 7:
$block = module_invoke('user', 'block', 'view', 'login'); // I have changed from 0 to 'login' for delta at drupal 7
$vars['login'] = $block['content'];
Both result in Fatal error. Any change that I am not aware of with module_invoke? There is no specific change at http://api.drupal.org/api/drupal/includes--module.inc/function/module_invoke/7
Any hint would be very much appreciated.