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
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.