Fix for Fix for custom logout

  1. <?php
  2. /**
  3.  * Custom logout function to display messages after logout.
  4.  */
  5. function evlka_logout() {
  6.   global $user;
  7.   watchdog('user', 'Session closed for %name.', array('%name' => $user->name));
  8.   // Destroy the current session:
  9.   session_destroy();
  10.   // Only variables can be passed by reference workaround.
  11.   $edit = array('show confirmation' => TRUE);
  12.   user_module_invoke('logout', $edit, $user);
  13.  
  14.   // Load the anonymous user
  15.   $user = drupal_anonymous_user();
  16.  
  17.   drupal_goto();
  18. }
  19.  
  20. /**
  21.  * Implement hook_user().
  22.  */
  23. function evlka_user($op, &$edit, &$account, $category = NULL) {
  24.   if ($op == 'logout' && isset($edit['show confirmation'])) {
  25.     $message_body = evlka_get_workflow_message('password_confirmation');
  26.     drupal_set_message($message_body);
  27.   }
  28. }
  29. ?

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.