user_roles() deprecated in D11.

Created on 6 August 2025, 8 days ago

Problem/Motivation

Deprecated function 'user_roles()' in D11.

Steps to reproduce

When attempting to access /admin/config/social-api/social-auth/roles, the page won't load because the `user_roles()` function has been deprecated.

Proposed resolution

I have to apologize as i don't know how to contribute a patch.

In SocialAuthRolesSettingsForm.php, fix the reference to user_roles() with the following:

    $role_storage = \Drupal::entityTypeManager()->getStorage('user_role');
    $roles = $role_storage->loadMultiple();

    foreach ($roles as $user_role_id => $user_role_name) {
        ...

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States erier

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024