Skip to:
Content

  • Home
  • Activity
  • Members
  • reference
WB Remedy

Code Reference

  • Home
  • Activity
  • Members
  • reference
Filter by type:
Search
Browse: Home / reference / Classes / BP_Signup / BP_Signup::validate()

BP_Signup::validate( string $key = '' )

Activate a signup.

Contents

  • Parameters
  • Return
    • Source
  • Related
    • Uses
    • Used By
  • Changelog
  • User Contributed Notes

Parameters #Parameters

$key

(string) (Optional) Activation key.

Default value: ''


Top ↑

Return #Return

(bool) True on success, false on failure.


Source #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 2.0.0
		 *
		 * @param bool $activated Whether or not the activation was successful.
		 */
		return apply_filters( 'bp_core_signups_validate', $activated );
	}

Expand full source code Collapse full source code View on Trac


Top ↑

Related #Related

Top ↑

Uses #Uses

Uses
Uses Description
bp-members/classes/class-bp-signup.php: bp_core_signups_validate

Filters the status of the activated user.

bp-loader.php: buddypress()

The main function responsible for returning the one true BuddyPress Instance to functions everywhere.

Top ↑

Used By #Used By

Used By
Used By Description
bp-members/classes/class-bp-signup.php: BP_Signup::resend()

Resend an activation email.

bp-members/classes/class-bp-signup.php: BP_Signup::activate()

Activate a pending account.

bp-members/classes/class-bp-signup.php: BP_Signup::delete()

Delete a pending account.

bp-members/bp-members-functions.php: bp_core_activate_signup()

Activate a signup, as identified by an activation key.


Top ↑

Changelog #Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

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


See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS

Follow BuddyPress on Twitter • GPL • Contact Us • Privacy • Terms of Service

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.