data); $updated_data = array(); // Extract conf_mail and conf_pass from the user's data if (is_array($data)) { foreach($data as $key => $value) { if (!in_array($key, array('conf_mail', 'conf_pass'))) { $updated_data[$key] = $value; } } // reinsert the cleaned data for the user $updated_data = db_escape_string(serialize($updated_data)); db_query("UPDATE {users} SET data = '%s' WHERE uid = %d", $updated_data, $user->uid); } } drupal_set_message(t('logintoboggan cleaning of user data successful')); return $ret; } /** * Implementation of hook_update_3() */ function logintoboggan_update_3() { if (variable_get('reg_passwd_set', 0) == 2) { variable_set('reg_passwd_set', 1); } }