Support Forum

I really screwed up – removed admin account before setting another as admin! HELP!

IO ionblue
ionblue
Member

Ok… I have 2 SP sites I admin and in an attempt to make the WP side of the house more secure I removed the “admin” username on each one after creating a new one for myself with a different ID.  Groovy and uneventful.  That was until I need to make some changes on the SP side and found that I now have NO way to access it!

Luckily I know the login for another SP admin which has access to most things, but not 100% access, so I can’t actually add myself as an admin even with that.  I need another way of doing this please.  Probably isn’t going to be easy and you’ll most likely need to email me directly so you don’t spew out the info here.  Whatever you have to, but please get back with me ASAP so I can correct this mess I’ve made.

Thanks.

Anthony

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Each user has records in the WordPress ‘usermeta’ table and one of them holds the capabilities that user has. The ‘meta_key’ for this data item is the WP table prefix plus the word ‘capabilities’. You will need to get to this record for your user_id.

The following data can be copied and pasted in to the meta_value field for the row in question. This will give full SP capabilities but also WordPress ‘Administrator’ role access. If there were any other capabilities being assigned (that may come from another plugin) then I am afraid I can not cater for those as they are unknown.

So this is the data in question. I would very strongly advise a database backup is made prior to updating this database table just in case…

a:17:{s:13:"administrator";s:1:"1";s:18:"SPF Manage Options";s:1:"1";s:17:"SPF Manage Forums";s:1:"1";s:22:"SPF Manage User Groups";s:1:"1";s:22:"SPF Manage Permissions";s:1:"1";s:21:"SPF Manage Components";s:1:"1";s:15:"SPF Manage Tags";s:1:"1";s:16:"SPF Manage Users";s:1:"1";s:19:"SPF Manage Profiles";s:1:"1";s:17:"SPF Manage Admins";s:1:"1";s:18:"SPF Manage Toolbox";s:1:"1";s:24:"SPF Manage Configuration";s:1:"1";s:18:"SPF Manage Plugins";s:1:"1";s:17:"SPF Manage Themes";s:1:"1";s:22:"SPF Manage Integration";b:1;s:16:"SPF Manage Polls";b:1;s:13:"SPF Manage PM";b:1;}

All being well – that should do the trick.

IO ionblue
ionblue
Member

Thank you, thank you, thank you!  I tried this on my local version as a test and it worked perfectly.  Now I’m waiting on DB access on the live sites so I can do the same after backing the DB’s up.  You’re a life saver!

BS Brad Siegfried
Brad Siegfried
Member

I just did the same thing.  This was exactly the solution I needed.  Worked like a charm.

 

Much nicer than restoring from backup.

 

Thank you!

MP Mr Papa
Mr Papa
Member

outstanding… thanks for the confirmation…