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;
}