Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
I really screwed up - removed admin account before setting another as admin! HELP!
Avatar
ionblue
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2014 - 12:20 pm

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 31, 2014 - 2:18 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
ionblue
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2014 - 2:44 pm

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!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2014 - 9:57 pm

you are welcome... glad we could help...

Avatar
Brad Siegfried
Member
sp_UserOfflineSmall Offline
Aug 5, 2014 - 4:05 pm

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!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 5, 2014 - 8:32 pm

outstanding... thanks for the confirmation...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17344
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79600