[buddypress-trac] [BuddyPress] #4813: Serialize Notification Settings
buddypress-trac
noreply at wordpress.org
Thu Feb 7 23:41:56 UTC 2013
#4813: Serialize Notification Settings
-------------------------+-----------------------------
Reporter: wdfee | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Settings | Version:
Severity: minor | Keywords:
-------------------------+-----------------------------
just a litte performance request: I've 13 database entries per user only
for notifications (with group email subscription / bbpress enabled). I
think the notifications would do pretty well as a serialized array in the
database.
Saving is easy, just change in bp_settings_action_notifications() in bp-
settings-actions.php from
{{{
if ( isset( $_POST['notifications'] ) ) {
foreach ( (array) $_POST['notifications'] as $key => $value ) {
bp_update_user_meta( (int) bp_displayed_user_id(), $key,
$value );
}
}
}}}
to
{{{
if ( isset( $_POST['notifications'] ) ) {
bp_update_user_meta( (int) bp_displayed_user_id(),
'notifications', $_POST['notifications'] );
}
}}}
The much bigger part is to change all queries against it via
bp_get_user_meta()
And a migration function...
Should go along with bbpress and Buddypress Group Email Subscription.
I don't know if there are other plugins out there that would need a
fallback.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4813>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list