Skip to:
Content

BuddyPress.org

Changeset 12961


Ignore:
Timestamp:
06/05/2021 04:07:30 AM (6 months ago)
Author:
imath
Message:

Members Invitations: add default values to 2 hooks callback parameters

In case a plugin fires the bp_core_signup_send_activation_key & bp_core_signup_user hooks with only one parameter, it avoids a PHP error about missing expected arguments.

Props comminski

Fixes #8480

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-invitations.php

    r12960 r12961  
    7878 * @return bool Whether or not to send the activation key.
    7979 */
    80 function bp_members_invitations_cancel_activation_email( $send, $user_id, $user_email, $activation_key, $usermeta ) {
     80function bp_members_invitations_cancel_activation_email( $send, $user_id = 0, $user_email = '', $activation_key = '', $usermeta = array() ) {
    8181    $invite = bp_members_invitations_get_invites(
    8282        array(
     
    106106 * @param string          $user_email    Email address requested by the user.
    107107 */
    108 function bp_members_invitations_complete_signup( $user_id, $user_login, $user_password, $user_email ) {
     108function bp_members_invitations_complete_signup( $user_id, $user_login = '', $user_password = '', $user_email = '' ) {
    109109    if ( ! $user_id ) {
    110110        return;
Note: See TracChangeset for help on using the changeset viewer.