function ctools_ajax_sample_login_success

cis7 ctools_ajax_sample.module ctools_ajax_sample_login_success($js, $action)
cle7 ctools_ajax_sample.module ctools_ajax_sample_login_success($js, $action)
elmsmedia7 ctools_ajax_sample.module ctools_ajax_sample_login_success($js, $action)
icor7 ctools_ajax_sample.module ctools_ajax_sample_login_success($js, $action)
meedjum_blog7 ctools_ajax_sample.module ctools_ajax_sample_login_success($js, $action)
mooc7 ctools_ajax_sample.module ctools_ajax_sample_login_success($js, $action)

Post-login processor: should we go to the user account or stay in place?

1 string reference to 'ctools_ajax_sample_login_success'
ctools_ajax_sample_menu in sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module
Implementation of hook_menu()

File

sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module, line 284
Sample AJAX functionality so people can see some of the CTools AJAX features in use.

Code

function ctools_ajax_sample_login_success($js, $action) {
  if (!$js) {
    // we should never be here out of ajax context
    return MENU_NOT_FOUND;
  }

  ctools_include('ajax');
  ctools_add_js('ajax-responder');
  $commands = array();
  if ($action == 'inplace') {
    // stay here
    $commands[] = ctools_ajax_command_reload();
  }
  else {
    // bounce bounce
    $commands[] = ctools_ajax_command_redirect('user');
  }
  print ajax_render($commands);
  exit;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.