function email_verify_update_7201 in Email Verify 7.2
Updates the selected forms for the new, more flexible way of selecting forms.
File
- ./
email_verify.install, line 61 - Install, update and uninstall functions for this module.
Code
function email_verify_update_7201() {
$forms = variable_get('email_verify_forms', '');
if (empty($forms)) {
// The user registration form.
$email_verify_user_registration = variable_get('email_verify_user_registration', NULL);
if (!empty($email_verify_user_registration)) {
// Add the form to the list.
$forms .= "user_register_form, mail\n";
// Delete the old variable.
variable_del('email_verify_user_registration');
}
// The user profile form.
$email_verify_user_profile = variable_get('email_verify_user_profile', NULL);
if (!empty($email_verify_user_profile)) {
// Add the form to the list.
$forms .= "user_profile_form, mail\n";
// Delete the old variable.
variable_del('email_verify_user_profile');
}
// The site-wide contact form.
$email_verify_site_contact = variable_get('email_verify_site_contact', NULL);
if (!empty($email_verify_site_contact)) {
// Add the form to the list.
$forms .= "contact_site_form, mail\n";
// Delete the old variable.
variable_del('email_verify_site_contact');
}
// The personal contact form.
$email_verify_personal_contact = variable_get('email_verify_personal_contact', NULL);
if (!empty($email_verify_personal_contact)) {
// Add the form to the list.
$forms .= "contact_personal_form, mail\n";
// Delete the old variable.
variable_del('email_verify_personal_contact');
}
variable_set('email_verify_forms', $forms);
}
}