• Hello,

    I have this issue, that i have a field which is under the Administrative section called u_id and this, using the before_submit_signup is adding the users WP id via the $post. Tested and works fine.

    But, I have also in the sign up, set the Duplicate Check to u_id, and if found over write the existing record, as its the same user just changing something. The process needs to be restarted, just like a normal original sign_up form, as its a multi form.

    But, when i click on continue from this page, which is the signup, I can see in the $post its adding the correct information, but it just reloads the same page, rather than moving to the next part of the form on a different page. And the details are not updated, or added, to the existing form.

    If i change the drop down on the Duplicate Check to give me an warning, and try the same, i get no message displayed either. So it must be getting stuck, but without an error i really dont know where. Any ideas ?

    https://www.ads-software.com/plugins/participants-database/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter MrAddy

    (@mraddy)

    I should add, if i remove the duplicate record to a different field, it works as expected, but adds a new record.

    Plugin Author xnau webdesign

    (@xnau)

    I’m guessing there’s some kind of hangup in your callback. Make sure your callback (the filter function you are firing on ‘pdb-before_submit_signup’) can handle the situation of an already existing user. This function must return the $post value in order for the submission to be saved, and it sounds like that is not happening.

    Thread Starter MrAddy

    (@mraddy)

    It is happening, here is the function in full

    function updateUserWPID($post) {
    
    	global $current_user;
    
    	$post['user_id'] = $current_user->user_email;
    
    	$post['u_id'] = $current_user->id;
    
    	//add_option('testval', $post);
    
    	return $post;
    }
    add_action('db-before_submit_signup', 'updateUserWPID', 10);

    All I am doing is adding the user id, and email, and I thought when the $post is returned with the details already existing, it would just overwrite them. But instead it does nothing ?

    Thread Starter MrAddy

    (@mraddy)

    If you look at the add_option I have managed to add to the options database, so i know its working and i cannot see any issue with it ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Duplicate Check not moving foward’ is closed to new replies.