Posted by decibel.places on August 25, 2008 at 6:41pm
Jump to:
| Project: | MySite |
| Version: | 5.x-3.2 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
When mysite default settings are changed, there should be an option to reset all pages to the new defaults
Is there a way to do this manually?
Comments
#1
The design is to set defaults and then let individual users override those defaults.
The way to do this manually would be to uninstall the module, re-install, and then reset the defaults.
You could also run the following queries directly to avoid a re-install.
DELETE FROM {mysite} WHERE uid > 0;DELETE FROM {mysite_page} WHERE uid > 0;
The problem then is that if your users have made any customizations, they will not know why their pages have been reset. That is the reason why this option does not currently exist.
#2
yeah, I understand the "customization" angle; however I am using it now and the site is in dev, when we change the defaults, we have to go through all the test users to make sure they are at the new defaults.
It would be nice if admin had a total reset button, rather than uninstall and reinstall!
The table mysite has the following structure:
uid title created updated layout style format message status theme confirm0 Default settings 1218593871 1219689111 columns default teasers NULL 1 garland 0
7 Evena 1219693810 1219693810 columns default teasers NULL 1 garland 0
2 rgoya 1219686928 1219686928 columns default teasers NULL 1 garland 0
4 abhas 1219689285 1219689285 columns default teasers NULL 1 garland 0
3 moderator 1219693807 1219693807 columns default teasers NULL 1 garland 0
So I guess we can construct a query to pull the uid=0 settings (layout, style, etc) and then UPDATE the rest of the columns...
next time, I'll try it...
#3
Sorry, I haven't worked with MySite in a while.
You need to empty the {mysite_data} table, not the {mysite} table.
DELETE FROM {mysite_data} WHERE uid > 0;DELETE FROM {mysite_page} WHERE uid > 0;
#4
DELETE FROM {mysite_data} WHERE uid > 0;DELETE FROM {mysite_page} WHERE uid > 0;
That will unset all settings, correct?
I want a way to update user's settings to new defaults for uid = 0
The individual settings are in the mysite and mysite_page tables right? layout, style, format, theme - so in those two tables I want to update all values to the uid = 0 values
Yeah, I could write a php snippet and make it a block or story or something...