function email_confirm_exit in Email Change Confirmation 7
Implements hook_exit().
File
- ./
email_confirm.module, line 510 - The Email Change Confirmation module.
Code
function email_confirm_exit() {
if (isset($_SESSION['email_changed'])) {
$pruned_messages = array();
$status_messages = drupal_get_messages('status', TRUE);
if (count($status_messages)) {
foreach ($status_messages['status'] as $message) {
if (strcmp($message, t('The changes have been saved.')) != 0) {
$pruned_messages[] = $message;
}
}
if (count($pruned_messages)) {
foreach ($pruned_messages as $message) {
drupal_set_message(filter_xss($message), 'status');
}
}
}
unset($_SESSION['email_changed']);
}
}