You are here

function email_confirm_user in Email Change Confirmation 5

Same name and namespace in other branches
  1. 6 email_confirm.module \email_confirm_user()

Implementation of hook_user().

File

./email_confirm.module, line 134

Code

function email_confirm_user($op, &$edit, &$account) {
  switch ($op) {
    case 'submit':
      if (!empty($edit['mail']) && $account->mail != $edit['mail'] && !user_access('administer users')) {
        email_confirm_mail($edit);
        module_invoke_all('email_confirm', 'email change', $account->uid, $account->mail, $edit['mail']);
        unset($edit['mail']);
      }
      break;
  }
}