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 array(); } /** * Implementation of hook_update_3() */ function logintoboggan_update_3() { if (variable_get('reg_passwd_set', 0) == 2) { variable_set('reg_passwd_set', 1); } return array(); } /** * Implementation of hook_update_4() */ function logintoboggan_update_4() { if (variable_get('toboggan_role', 2) == 1) { variable_set('toboggan_role', 2); drupal_set_message(t('Your previous setting for the logintoboggan pre-auth role was the anonymous user role, which is no longer allowed. The pre-auth role has now been set to the authenticated user role for your site. Because of this change, all unvalidated users on your site now have authenticated user permissions! If you wish to retain the previous functionality, create a new user role with the same access permissions as the anonymous user, and set the logintoboggan pre-auth role to the newly created role. You will also need to manually add any previously unvalidated users to the newly created pre-auth role.'), 'error'); } return array(); }