bp_settings_update_notification_settings( int $user_id, array $settings )

Update email notification settings for a specific user.

Description

Parameters

$user_id

(Required) ID of the user whose settings are being updated.

$settings

(Required) Settings array.

Source

File: bp-settings/bp-settings-functions.php

function bp_settings_update_notification_settings( $user_id, $settings ) {
	$user_id = (int) $user_id;

	$settings = bp_settings_sanitize_notification_settings( $settings );
	foreach ( $settings as $setting_key => $setting_value ) {
		bp_update_user_meta( $user_id, $setting_key, $setting_value );
	}
}

Changelog

Changelog
Version Description
BuddyPress 2.3.5 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.