You are here

function welcome_page_welcome_page in Util 7

Display the welcome page or redirect into the site.

1 string reference to 'welcome_page_welcome_page'
welcome_page_menu in contribs/welcome_page/welcome_page.module
Implements hook_menu().

File

contribs/welcome_page/welcome_page.module, line 64
Allow a site to have a welcome page without allowing other content to be viewed.

Code

function welcome_page_welcome_page() {
  global $user;

  // If the user is logged in, then just do a normal front page.
  if ($user->uid) {
    drupal_goto(variable_get('welcome_page_redirect', 'node'));
  }

  // Otherwise, create a render array for our stuff.
  $build = array();
  $build['welcome_message'] = array(
    '#markup' => check_markup(variable_get('welcome_page_welcome_body', 'Welcome to the site!'), variable_get('welcome_page_welcome_format', NULL)),
  );
  return $build;
}