I was looking at the user table and noticed for a super admin ( have access to network admin panel ) and an admin to a network site have same wp_capabilities
which is a:1:{s:13:"administrator";b:1;}
and also the wp_user_level
is 10
for both.
So, I was wondering what is the database value that differentiate between a super admin and an admin? I don’t see any more usermeta that relates to network admin level.
What is the proper way to assign super admin capability to a admin via:
- Database Edit.
- Via Code.
Site admins are stored in a site option as an array of usernames.
For example, using SQL in MySQLWorkbench you can do a query such as this:
To get back a serialised PHP array. Modifying this value by adding your username and user ID will make you a site admin.
If you’re just looking to see who is a site admin, you have these functions:
If on a single site rather than a multisite, any user with the delete_users capability will be regarded as a super admin.
I checked the MultiSite Database and found following two entries in wp_sitemeta table which differentiate between a super admin and an admin.
admin_user_id and site_admins