function page_manager_contact_user

Entry point for our overridden user view.

This function asks its assigned handlers who, if anyone, would like to run with it. If no one does, it passes through to Drupal core's user view, which is user_page_view().

1 string reference to 'page_manager_contact_user'
page_manager_contact_user_menu_alter in page_manager/plugins/tasks/contact_user.inc
Callback defined by page_manager_contact_user_page_manager_tasks().

File

page_manager/plugins/tasks/contact_user.inc, line 78

Code

function page_manager_contact_user($form_id, $account) {
    // Load my task plugin:
    $task = page_manager_get_task('contact_user');
    // Load the account into a context.
    ctools_include('context');
    ctools_include('context-task-handler');
    $contexts = ctools_context_handler_get_task_contexts($task, '', array(
        $account,
    ));
    $output = ctools_context_handler_render($task, '', $contexts, array(
        $account->uid,
    ));
    if ($output !== FALSE) {
        return $output;
    }
    module_load_include('inc', 'contact', 'contact.pages');
    $function = 'contact_personal_form';
    foreach (module_implements('page_manager_override') as $module) {
        $call = $module . '_page_manager_override';
        if (($rc = $call('contact_user')) && function_exists($rc)) {
            $function = $rc;
            break;
        }
    }
    // Otherwise, fall back.
    return drupal_get_form($function, $account);
}