KakapoWP KakapoWP
Log in Secure Lifetime
Help Center/Roles/Moving users and granting several roles

Moving users and granting several roles

Gilt für: Kakapo Roles· 4 min read

Roles change, and then the people have to move with them. Under “Assign & migrate” all holders of a role move into another one at once. When a role is deleted this happens anyway — otherwise its users would hold a role that no longer exists.

Move all users of a role

  1. In the left sidebar under “Users” choose the item “Assign & migrate”.
  2. In the card “Move all users of a role” pick the source and the target role.
  3. Confirm the move. The message afterwards names the number of changed accounts.
Whoever held the old role as their only one gets the new one. Whoever still carries a second one only loses the old — giving them the target role on top would be an extension of rights that nobody ordered.

Several roles per user

WordPress’s database has always been able to do this — wp_capabilities is an array — only its interface shows exactly one role. In the user profile, under “Additional roles”, there is a field with all of them. The capabilities add up: a user may do anything at least one of their roles may do. Writing goes through WP_User::add_role() and remove_role().

Per-user capabilities for the special case

Sometimes exactly one person needs exactly one exception. Under “Per-user capabilities” a capability can be granted to one user — on top of their roles or explicitly against them. WordPress stores roles and per-user capabilities in the same row; an explicitly withdrawn capability therefore beats the role, even the administrator’s. WordPress’s own interface shows none of this.

wp_capabilities
Your own access is left out if a bulk action would take “Administrator” from you — otherwise you would not get onto this page any more. The message says so afterwards.
Was this article helpful?