I want to change the below function,
function user_block_view($delta = '') { // Line 1 //
global $user; // Line 2 //
$block = array(); // Line 3 //
switch ($delta) { // Line 4 //
case 'login': // Line 5 //
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
$block['subject'] = t('User login'); // Line 7 //
$block['content'] = drupal_get_form('user_login_block');
} // Line 9 //
return $block; // Line 10
...
} // Line n
I actually want to add
else if($user -> uid){
$block['subject'] = t('Subject');
$block['content'] = someotherfunction();
}
after the line 9 of the above code.
How can I implement that in my template.php (custom theme)
I tried a lot and didn't succeed yet.
That should work.
Here is more info: how to override $block->content in drupal?