BP_Signup::validate( string $key = '' )
Activate a signup.
Description
Parameters
- $key
-
(Optional) Activation key.
Default value: ''
Return
(bool) True on success, false on failure.
Source
File: bp-members/classes/class-bp-signup.php
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | public static function validate( $key = '' ) { global $wpdb ; if ( empty ( $key ) ) { return ; } $activated = $wpdb ->update( // Signups table. buddypress()->members->table_name_signups, array ( 'active' => 1, 'activated' => current_time( 'mysql' , true ), ), array ( 'activation_key' => $key , ), // Data sanitization format. array ( '%d' , '%s' , ), // WHERE sanitization format. array ( '%s' , ) ); /** * Filters the status of the activated user. * * @since BuddyPress 2.0.0 * * @param bool $activated Whether or not the activation was successful. */ return apply_filters( 'bp_core_signups_validate' , $activated ); } |
Changelog
Version | Description |
---|---|
BuddyPress 2.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.