As zitronenroellchen told us, there is a much simpler way to do this.
First identify the UID of the user you want to change. Then get the target UID. For me, I wanted to replace 155 by 1, the default value for Superuser.
Search the database and identify the tables where UID field is present.
For any table in the list
Change over the UID of the destination if it exists.
UPDATE `mybb_threads` SET uid=999 WHERE uid = 1;
UPDATE `mybb_threads` SET uid=1 WHERE uid = 155;
UPDATE `mybb_posts` SET uid=999 WHERE uid = 1;
UPDATE `mybb_posts` SET uid=1 WHERE uid = 155;[/code]
And finally, replace the user in mybb_users:UPDATE `mybb_users` SET uid=1 WHERE uid = 155;[/code]
Of course, an easier way is to add the user to the list of SuperAdmins
Just discovered that, to retake SuperAdmin permissions for a user, there is a much easier solution, to edit config.php
$config['super_admins'] = 'UID1,UID2';
Plugin uploader issues once again!DROP TABLE `mybb_pluginuploader`;
alter table `mybb_users` drop column `pluginuploader_key`;[/code]
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.