MyBB Community Forums

Full Version: Setting User Preferences via MySQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to change my preferences (AdminCP Home->Preferences) in the database data directly. How can I do that?

Background Info:

I did an upgrade for a test on a copy from 1.4 (latest) to 1.6.

The update itself went good so far. I could copy over all new files (verfied).

I can login in the AdminCP of the updated version, no problem.

But I when I want to change my user's preferences, this does not work (Home->Preferences).

When I change my preferences, I get the following message on top in the flasher: "The preferences have been successfully updated." (Green Background, OK Icon)

BUT the preferences are not changed.

Getting round it by changing it in the database isn't the best way to fix it, much better to try and find out what's wrong to stop it saving in the first place.

Have you tried another browser?? It's just a basic form, submit and updates with the data you submit.
Well, thanks for letting me know, but I was actually concerned about the info I asked for. So if you can give me some quick notes on how to edit that via SQL queries, this would help me actually.

Not to sound rude, MyBB already reports that data has been submiteed, as you can see with the flasher contents. With Flasher I mean the highlighted message on top after submitting forms.
Do excuse me for trying to fix the actual cause of the problem Smile

UPDATE `mybb_adminoptions` SET `codepress` = '0' WHERE `uid` = '1';

Change the 1 if that's not your UID.
Well I actually needed to find out a bit more from the DB side to fix the actual cause. So thanks for the hint on the SQL. It immediatly revealed the problem which lies within the data in my case:

+-----+------------+-----------+-------+-------------+--------------+---------------+--------------------+
| uid | cpstyle    | codepress | notes | permissions | defaultviews | loginattempts | loginlockoutexpiry |
+-----+------------+-----------+-------+-------------+--------------+---------------+--------------------+
|   2 | sharepoint |         1 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         0 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         0 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         0 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         1 |       |             |              |             0 |                  0 |
|   2 | default    |         1 |       |             |              |             0 |                  0 |
|   2 | default    |         1 |       |             |              |             0 |                  0 |
|   2 | default    |         0 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         0 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         0 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         0 |       |             |              |             0 |                  0 |
|   2 | default    |         1 |       |             |              |             0 |                  0 |
|   2 | sharepoint |         1 | teat  |             |              |             0 |                  0 |
+-----+------------+-----------+-------+-------------+--------------+---------------+--------------------+

I have duplicated values that are a result of a db migration done wrong. I just see that UID is primary key in the default data, but the copied data does not have it. So a problem on my end, not in the mybb software.

Tackling with it now.