Skip to:
Content
Pages
Categories
Search
Top
Bottom

start procedure when profile is edited.


  • CommonEasy
    Participant

    @commoneasy

    Hi there,

    I try to perform a procedure query which updates the wp_bp_xprofile_data table with information from a view. The procedure should be started when somebody updates his profile. this is the code i use in bp-custom.php.

    function something_updated_profile() {
    
      $wpdb->query("CALL dekking_ophalen( )");
      
      }
    add_action('xprofile_updated_profile', 'something_updated_profile');

    however, when i update my profile i only see a white page ( i have debugger enabled). i use wordpress 3.9.1 & bp 2.0.1. The stored procedure is stated as:

     INSERT INTO wp_bp_xprofile_data
    ( field_id,  user_id, value )
    
    SELECT 15, User,  dekking_absoluut
    FROM  dekking
    
    On duplicate KEY UPDATE 
    wp_bp_xprofile_data.value=(SELECT dekking.dekking_absoluut
      FROM dekking
      WHERE dekking.user=wp_bp_xprofile_data.user_id )

    what point am i missing here?

  • The topic ‘start procedure when profile is edited.’ is closed to new replies.
Skip to toolbar