function sharedemail_account_form_validate in Shared Email 7
Form validation handler for user_account_form().
This function adds a prefix to the e-mail address before calling user_account_form_validate() to perform the default form validation, then restores the e-mail address.
See also
1 string reference to 'sharedemail_account_form_validate'
- sharedemail_form_user_account_form_alter in ./
sharedemail.module - Implements hook_form_FORM_ID_alter() for user_account_form().
File
- ./
sharedemail.module, line 124 - Allow an e-mail address to be used by more than one user account.
Code
function sharedemail_account_form_validate($form, &$form_state) {
// Test whether the e-mail address should be disguised.
if ($mail = sharedemail_is_shared_email($form, $form_state)) {
$form_state['values']['mail'] = 'sharedemail_' . $mail;
}
// Call the User module's validate function.
user_account_form_validate($form, $form_state);
// Restore the actual e-mail address.
if ($mail) {
$form_state['values']['mail'] = $mail;
}
}