Fix for Code

  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. function evlka_user($op, &$edit, &$account, $category = NULL) {
  21.   if ($op == 'logout' && isset($edit['show confirmation])) {
  22.    $message_body = evlka_get_workflow_message('password_confirmation');
  23.    drupal_set_message($message_body);
  24.  }
  25. }
  26. ?

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.