Commit 70b8337cdcbd4b4ec5633bd88fd6a8a81ba71d91 from [#1291100] removed the category system from user edit and view and made several API changes.

This affects a number of hooks, detailed below, and may manifest itself in several ways such as "Notice: Undefined index: #user_category in foo_form_user_profile_form_alter()"

Solution is to remove any references to the legacy category system from module code. For example:

Drupal 7

<?php
function system_form_user_profile_form_alter(&$form, &$form_state) {
  if (
$form['#user_category'] == 'account') {
    if (
variable_get('configurable_timezones', 1)) {
     
system_user_timezone($form, $form_state);
    }
    return
$form;
  }
}
?>

Backdrop CMS

<?php
function system_form_user_profile_form_alter(&$form, &$form_state) {
  if (
config_get('system.date','user_configurable_timezones')) {
   
system_user_timezone($form, $form_state);
  }
  return
$form;
}
?>

API Changes

Parameter $category was removed from the signatures of all functions in several modules. Also, a few functions were removed, and one function was added.

Changes to Hooks

The following changes were made to the hook functions. All implementations of these hooks in core were changed accordingly.

Signature Changes

Removed Functions

  • hook_user_categories()

Changes to Other API Functions

Signature Changes

Added Functions

  • user_update_8000()

Removed Functions

  • user_element_info()
  • user_category_load($uid, &$map, $index)
  • template_preprocess_user_profile_item(&$variables)
  • template_preprocess_user_profile_category(&$variables)
Introduced in branch: 
1.0.x
Introduced in version: 
1.0.0
Impacts: 
Module developers