[buddypress-trac] [BuddyPress] #4813: Serialize Notification Settings

buddypress-trac noreply at wordpress.org
Sat Feb 23 16:20:03 UTC 2013


#4813: Serialize Notification Settings
-------------------------+-----------------------------
 Reporter:  wdfee        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  low          |   Milestone:  Future Release
Component:  Settings     |     Version:
 Severity:  minor        |  Resolution:
 Keywords:  needs-patch  |
-------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:   => needs-patch
 * priority:  normal => low
 * milestone:  Awaiting Review => Future Release


Comment:

 In some cases I actually prefer to keep settings like this in separate
 keys, rather than serialized, but in the case of message preferences I
 think it makes sense to combine them.

 As you note, we'll need a migration script. Alternatively (or in addition)
 we could have wrapper functions for checking someone's notification
 status. Eg

 {{{
 function bp_get_user_notification_setting( $user_id, $type ) {
     if ( $settings = bp_get_user_meta( $user_id,
 'bp_notifications_settings', true ) ) {
         $setting = $settings[ $type ];
     } else {
         $setting = bp_get_user_meta( $user_id, 'notification_' . $type,
 true );
     }
 }
 }}}

 In any case, this kind of change is likely to break any plugins that are
 fetching these settings in their standalone keys.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4813#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list