Day_ Posted July 2, 2020 Posted July 2, 2020 (edited) Can anybody help me out with an SQL query to reset all members to take me to comments I haven't read. Edited July 2, 2020 by day_
DawPi Posted July 2, 2020 Posted July 2, 2020 SQL Query? You can't because it's stored like this: /** * Get member link preference * * @return string */ public function linkPref() { if ( $this->members_bitoptions['link_pref_unread'] ) { In bitoptions. So you need a custom PHP script to achieve this.
bfarber Posted July 6, 2020 Posted July 6, 2020 That's not true. UPDATE core_members SET members_bitoptions=members_bitoptions & ~1048576; UPDATE core_members SET members_bitoptions=members_bitoptions | 524288; Something along those lines should do what you are after. Day_ 1
Day_ Posted July 6, 2020 Author Posted July 6, 2020 13 minutes ago, bfarber said: That's not true. UPDATE core_members SET members_bitoptions=members_bitoptions & ~1048576; UPDATE core_members SET members_bitoptions=members_bitoptions | 524288; Something along those lines should do what you are after. Thanks, ran the query and it's changed all the bit options but when checking some older members preferences in the admin panel it shows they are still set to from beginning
bfarber Posted July 7, 2020 Posted July 7, 2020 We have an open bug report internally to look into that behavior based on another topic here. Re-reviewing the queries I supplied, it should be members_bitoptions2 and not members_bitoptions (note the "2"). Apologies for that. Meddysong and Day_ 1 1
Day_ Posted July 8, 2020 Author Posted July 8, 2020 19 hours ago, bfarber said: We have an open bug report internally to look into that behavior based on another topic here. Re-reviewing the queries I supplied, it should be members_bitoptions2 and not members_bitoptions (note the "2"). Apologies for that. This worked, thank you so much!
marklcfc Posted July 8, 2020 Posted July 8, 2020 (edited) On 7/7/2020 at 2:56 PM, bfarber said: Re-reviewing the queries I supplied, it should be members_bitoptions2 and not members_bitoptions (note the "2"). Apologies for that. Will I need to run this or are you planning for the setting in admin cp have the same effect? Edited July 8, 2020 by marklcfc
Ocean West Posted July 8, 2020 Posted July 8, 2020 curious why IPS stores data as bitoptons vs just a JSON object or array?
bfarber Posted July 9, 2020 Posted July 9, 2020 22 hours ago, marklcfc said: Will I need to run this or are you planning for the setting in admin cp have the same effect? We have an open bug report to look into the originally reported issue. I can't promise yet that your use case will be covered (because you're using a custom third party plugin on the current version which changes the default behavior), however we did confirm that it appears the ACP preference may not always work as expected which we'll fix. 21 hours ago, Ocean West said: curious why IPS stores data as bitoptons vs just a JSON object or array? We would have had to add a column to the members table, and we try to avoid doing that unless absolutely necessary. The table can be huge. IPCommerceFan 1
marklcfc Posted July 22, 2020 Posted July 22, 2020 On 7/9/2020 at 3:12 PM, bfarber said: however we did confirm that it appears the ACP preference may not always work as expected which we'll fix. Any news on that, just to mention again I'd like to set all current members and future members to have by default Take me to comments I haven't read
Stuart Silvester Posted July 22, 2020 Posted July 22, 2020 1 hour ago, marklcfc said: Any news on that, just to mention again I'd like to set all current members and future members to have by default Take me to comments I haven't read Yes, this was fixed in beta 9. The admin defined preference is now always used if the end-user hasn't specified their own preference. marklcfc 1
Recommended Posts