User account form not consistent with the API

Created on 27 March 2015, about 10 years ago
Updated 27 May 2025, 16 days ago

Problem/Motivation

The module is adding a roles_change new form element to the user_account_form(). By doing so, it breaks all other validations that other modules are trying to do against the official $form['account']['roles'] form element. For example an additional validation callback should check $form_state['values']['roles_change'] instead of $form_state['values']['roles'] which a 3rd party module would expect.

Moreover, even if a module tries to integrate with Role Delegation by applying validations against $form_state['values']['roles_change'] he might fail because even this is not consistent. When a user has administer permissions acces, he will get the original $form_state['values']['roles'] and no $form_state['values']['roles_change'].

Proposed resolution

Make the form consistent as keys with the original user_account_form(). Use roles key for roles in form.

Remaining tasks

None.

User interface changes

None.

API changes

None.

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024