BP_Members_Admin::bp_registration_update_option( string $old_value, string $value )
Update site registrations options based on the BuddyBoss general registration settings.
Description
Parameters
- $old_value
-
(Required)
- $value
-
(Required)
Source
File: bp-members/classes/class-bp-members-admin.php
public function bp_registration_update_option( $old_value, $value ) { if ( 1 === $value ) { if ( ! is_multisite() ) { update_option( 'users_can_register', 1 ); } else { update_site_option( 'registration', 'all' ); } } else { if ( '' !== $value ) { if ( ! is_multisite() ) { update_option( 'users_can_register', 0 ); } else { update_site_option( 'registration', 'none' ); } } } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | 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.