Jump to content

Recommended Posts

Posted

Hello,

I was [locally] tweaking with the code, just wanted to delete an image, I run $user->delete("avatar"). Done.

Can I update another user from the database to superuser role?

Thanks!

Posted
$user = $users->get("test");
$user->addRole("superuser");
$user->of(false);
$user->save();

Or if you want to actually do it through the database, you can go into PHPMyAdmin and find the page ID for the user you want to change (from the pages table) and then go to the field_roles table and change the "data" value for that pages_id to 38

  • Like 3
Posted

Of course you could even add back in the user you want first:

$users->add("name")

And then add the role to that new user!

PS some of these options only show in the cheatsheet if you click the "advanced" button.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...