[buddypress-trac] [BuddyPress Trac] #6932: Emails: real unsubscribe functionality

buddypress-trac noreply at wordpress.org
Wed Jul 20 18:20:33 UTC 2016


#6932: Emails: real unsubscribe functionality
-------------------------+---------------------------
 Reporter:  DJPaul       |       Owner:  tharsheblows
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  2.7
Component:  Emails       |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |
-------------------------+---------------------------

Comment (by djpaul):

 In [changeset:"10950"]:
 {{{
 #!CommitTicketReference repository="" revision="10950"
 Core: fix infinite loop in bp_core_clear_root_options_cache

 In r10941, an email unsubscribe feature was introduced. This added a new
 site option that stores the verification salt. For new installations, we
 added the variable to bp_add_options, and for upgrades, in a new function.
 We generate the value by using a randomly-generated string, which uses
 wp_rand internally.

 On WordPress older than 4.4, wp_rand's implementation was causing infinite
 loops in bp_core_clear_root_options_cache because that adds its own site
 option, and BuddyPress has some cache clearing logic in
 bp_core_clear_root_options_cache which is called whenever options are
 added or updated, which in turns re-calls bp_get_default_options.

 We now un-hook/re-hook bp_core_clear_root_options_cache inside that
 function to prevent loops.

 WordPress 4.4+ re-implemented wp_rand and doesn't cause a loop.

 See #6932
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6932#comment:33>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list