• Knowledge Base
    • All Articles
    • BuddyBoss Platform
    • BuddyBoss Theme
    • BuddyBoss App
    • Integrations
    • Advanced Setup
    • Troubleshooting
    • Release Notes
      • BuddyBoss Platform
      • BuddyBoss Platform Pro
      • BuddyBoss Theme
      • BuddyBoss App
      • BuddyBoss App Plugin
      • Other Products
  • Developers
    • Developer Tutorials
      • Web Development
      • App Development
    • Code Reference
      • Functions
      • Hooks
      • Classes
      • Methods
      • Commands
      • App Codex
    • REST API
      • BuddyBoss Platform
      • BuddyBoss App
    • Font Cheatsheet
    • Github Project
  • Roadmap
  • Go to BuddyBoss
    Contact Support
    Filter
    • Knowledge Base
      • All Articles
      • BuddyBoss Platform
      • BuddyBoss Theme
      • BuddyBoss App
      • Integrations
      • Advanced Setup
      • Troubleshooting
      • Release Notes
        • BuddyBoss Platform
        • BuddyBoss Platform Pro
        • BuddyBoss Theme
        • BuddyBoss App
        • BuddyBoss App Plugin
        • Other Products
    • Developers
      • Developer Tutorials
        • Web Development
        • App Development
      • Code Reference
        • Functions
        • Hooks
        • Classes
        • Methods
        • Commands
        • App Codex
      • REST API
        • BuddyBoss Platform
        • BuddyBoss App
      • Font Cheatsheet
      • Github Project
    • Roadmap
    • Go to BuddyBoss
    Filter
    Filter

    Contents

    • Description
    • Parameters
    • Return
    • Source
    • Changelog
    • Related
    Code Reference Classes BP_Signup BP_Signup::update()

    BP_Signup::update( array $args = array() )

    Update the meta for a signup.

    Description

    This is the way we use to "trace" the last date an activation email was sent and how many times activation was sent.

    Parameters

    $args

    (array) (Optional) Array of arguments for the signup update.

    • 'signup_id'
      (int) User signup ID.
    • 'meta'
      (array) Meta to update.

    Default value: array()

    Return

    (int) The signup id.

    Source

    File: bp-members/classes/class-bp-signup.php

    	public static function update( $args = array() ) {
    		global $wpdb;
    
    		$r = bp_parse_args( $args,
    			array(
    				'signup_id'  => 0,
    				'meta'       => array(),
    			),
    			'bp_core_signups_update_args'
    		);
    
    		if ( empty( $r['signup_id'] ) || empty( $r['meta'] ) ) {
    			return false;
    		}
    
    		$wpdb->update(
    			// Signups table.
    			buddypress()->members->table_name_signups,
    			// Data to update.
    			array(
    				'meta' => serialize( $r['meta'] ),
    			),
    			// WHERE.
    			array(
    				'signup_id' => $r['signup_id'],
    			),
    			// Data sanitization format.
    			array(
    				'%s',
    			),
    			// WHERE sanitization format.
    			array(
    				'%d',
    			)
    		);
    
    		/**
    		 * Filters the signup ID which received a meta update.
    		 *
    		 * @since BuddyPress 2.0.0
    		 *
    		 * @param int $value The signup ID.
    		 */
    		return apply_filters( 'bp_core_signups_update', $r['signup_id'] );
    	}
    

    Expand full source code Collapse full source code

    Changelog

    Changelog
    Version Description
    BuddyPress 2.0.0 Introduced.

    Related

    Uses

    Uses
    Uses Description
    bp-loader.php: buddypress()

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

    bp-members/classes/class-bp-signup.php: bp_core_signups_update

    Filters the signup ID which received a meta update.

    bp-core/bp-core-functions.php: bp_parse_args()

    Merge user defined arguments into defaults array.

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

    Resend an activation email.

    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.

    © 2023 • BuddyBoss