Jump to content

SQL query to reset all members to take me to unread content


Recommended Posts

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.

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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! 

Link to comment
Share on other sites

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 by marklcfc
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
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

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...