Useful Profile Builder Hooks

List of useful actions and filters in Profile Builder.

Registration

  • wppb_register_success – Action triggered when a user successfully registers through any Profile Builder registration form

    @param array $http_request - HTTP Request containing all the fields submitted
    @param string $form_name - The registration form name specified when using a custom Register form. Is 'unspecified' if using default registration
    @param int $user_id - ID of registered user. Is NULL if Email Confirmation is active
    Example:

    1
    2
    3
    4
    
    add_action( 'wppb_register_success', 'wppbc_custom_code', 20, 3 );
    function wppbc_custom_code( $http_request, $form_name, $user_id ){
    	// custom code
    }
  • wppb_activate_user – Action triggered when the user successfully confirms his email, if Email Confirmation is active

    @param int $user_id - User ID of registered user
    @param string $password- Always NULL. Kept for backwards compatibility
    @param array $meta - Array containing all the fields submitted in registration form. Password is hashed

Edit Profile

  • wppb_edit_profile_success – Action triggered when a user successfully edits his profile through any Profile Builder edit-profile form

    @param array $http_request - HTTP Request containing all the fields submitted
    @param string $form_name - The edit-profile form name specified when using a custom Edit Profile form. Is 'unspecified' if using default edit-profile
    @param int $user_id - ID of user profile being edited
    Example:

    1
    2
    3
    4
    
    add_action( 'wppb_edit_profile_success', 'wppbc_custom_code', 20, 3 );
    function wppbc_custom_code( $http_request, $form_name, $user_id ){
    	// custom code
    }

Emails

  • wppb_send_email – Filter triggered for every email sent by Profile Builder, that allows you to prevent certain types of mails from being sent

    @param boolean $send_mail - Whether or not to send the email. Default value is true
    @param string $to - Email recipient
    @param string $subject - Email subject
    @param string $message - Email body message
    @param string $context - Context of sending message. Possible values: 'email_user_activate', 'email_user_approved', 'email_user_unapproved', 'email_user_need_approval', 'email_user_account_info'

Admin Approval

  • wppb_after_user_approval – Action triggered after an user is approved from the Users -> Admin Approval panel

    @param int $user_id - The User ID of the approved user.

    1
    2
    3
    4
    
    add_action( 'wppb_after_user_approval', 'wppbc_custom_code', 20 );
    function wppbc_custom_code( $user_id ){
    	// custom code
    }
  • wppb_after_user_unapproval – Action triggered after an user is unapproved from the Users -> Admin Approval panel

    @param int $user_id - The User ID of the unapproved user.

    1
    2
    3
    4
    
    add_action( 'wppb_after_user_unapproval', 'wppbc_custom_code', 20 );
    function wppbc_custom_code( $user_id ){
    	// custom code
    }

Read more about actions and filters in the WordPress Codex.

Profile Builder Pro

Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.

Unlock PRO Features

Or download FREE version