Render alternative content if user is logged in instead of redirecting to user/uid I have a menu router with type MENU_CALLBACK and it's 'page callback' property points to a function that implements render API, as follow:

 /** Implements hook_menu **/
function custom_render_menu() {
  $items['register-profile'] = array(
    'page callback' =&gt; 'custom_render_register_profile',
    'type' =&gt; MENU_CALLBACK,
  );
  return $items;
}

/** Implements callback page for register-profile **/
function custom_render_register_profile() {
  $user_register_form = drupal_get_form('user_registration_form');
  $markup = user_is_logged_in() ? t("Alternative Content") : drupal_render($user_register_form);
  $output = array( '#markup' =&gt; $markup);
  return $output;
}


If the user is not logged in, the registration form displays correctly, but if the user is logged in, the page was redirected to user/uid router, showing user's profile. How can I display an alternative content instead of redirecting the user to their user page?
function custom_render_register_profile() {
global $user;
global $base_url;
$uid=$user-&gt;uid;
if($uid)
{
drupal_goto('url where you want to take login user..like $base_url./node/1');
}
else
{
  $user_register_form = drupal_get_form('user_registration_form');
  $markup =drupal_render($user_register_form);
  $output = array( '#markup' =&gt; $markup);
  return $output;
}
}