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
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | 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.