bp_settings_update_notification_settings( int $user_id, array $settings )

Update email notification settings for a specific user.

Parameters Parameters


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


(array) (Required) Settings array.

Source 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 );

Top ↑

Changelog Changelog

Version Description
2.3.5 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.