Site Building

7.6. Changing a User’s Roles for Drupal 8, 9, 10, and 11

Goal

Change or add roles to a given user, either by editing a single-user or by applying a bulk operation.

Site prerequisites

The user account that you want to update, and the role you want it to have, must already exist. See Section 7.4, “Creating a User Account”, Section 7.3, “Creating a Role”, and Section 7.5, “Assigning Permissions to a Role”.

Steps

Sprout Video

Updating the roles using single-user editing method

  1. In the Manage administrative menu, navigate to People (admin/people).
  2. Locate the user 1 account (named "admin") to assign it the Administrator role. If it is not immediately visible, use the Name or email contains filter, or other filters, to narrow down the list.
  3. Click Edit to update the user account.

    Image
    People page

  4. On the Edit page, scroll down to Roles section. Check the Administrator role for the user account.

    Image
    Roles section of user edit page

  5. Click Save to update the user account. You should be returned to the People page and see a message saying that the changes have been saved.

    Image
    Confirmation message

Updating the roles using bulk editing method

  1. If the users Happy Farm and Sweet Honey did not already have the Vendor role, here is how you would add it. In the Manage administrative menu, navigate to People (admin/people).
  2. Locate Vendor user accounts Sweet Honey and Happy Farm and check them. If they are not immediately visible, use the Name or email contains filter, or other filters, to narrow down the list.
  3. Select Add the Vendor role to the selected user(s) from the Action select list.

    Image
    People page with bulk operation set up

  4. Click Apply to selected items. You should see a message indicating that the desired changes were made.

    Image
    Confirmation message

Drupal User Guide