system_update_6038

Versions
6
system_update_6038()

Ensure that "Account" is not used as a Profile category.

Related topics

Code

modules/system/system.install, line 2279

<?php
function system_update_6038() {
  $ret = array();
  if (db_table_exists('profile_fields')) {
    $ret[] = update_sql("UPDATE {profile_fields} SET category = 'Account settings' WHERE LOWER(category) = 'account'");
    if ($affectedrows = db_affected_rows()) {
      drupal_set_message('There were '. $affectedrows .' profile fields that used a reserved category name. They have been assigned to the category "Account settings".');
    }
  }
  return $ret;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.