You are here

colorbox.pages.inc in Colorbox 6

Same filename and directory in other branches
  1. 7 colorbox.pages.inc

User page callback file for the colorbox module.

File

colorbox.pages.inc
View source
<?php

/**
 * @file
 * User page callback file for the colorbox module.
 */

/**
 * Menu callback for colorbox_login.
 */
function colorbox_login() {

  // Redirect failed logins to the standard user login form.
  if (isset($_POST['form_id']) && $_POST['form_id'] == 'user_login') {
    return drupal_get_form('user_login');
  }
  colorbox_form_page('user_login');
}

/**
 * Menu callback for colorbox_form_page.
 */
function colorbox_form_page($form_id) {
  $GLOBALS['devel_shutdown'] = FALSE;

  // Prevent devel module from spewing.
  switch ($form_id) {
    case 'contact_mail_page':
      module_load_include('inc', 'contact', 'contact.pages');
      print contact_site_page();
      break;
    case 'user_pass':
      module_load_include('inc', 'user', 'user.pages');
    default:
      $form = drupal_get_form($form_id);
      if (!empty($form)) {
        print $form;
      }
  }
  exit;
}

Functions

Namesort descending Description
colorbox_form_page Menu callback for colorbox_form_page.
colorbox_login Menu callback for colorbox_login.