Forums

Trouble with user_register hook (1 post)

  1. btwpuser
    Member
    Posted 7 months ago #

    Hi,

    I'm trying to develop a small plugin, I have some test code written but it's not working as expected.

    Here is my test code:

    add_action(‘user_register’, ‘modify_user_info_GMP’, 10, 1);
    
    function modify_user_info_GMP( $user_id )  {
    	update_user_meta( $user_id, 'first_name', 'First1' );
    	update_user_meta( $user_id, 'last_name', 'Last1');
    }

    According to my understanding of the docs this should work, but it doesn't. I've tried testing with a delay() as well and it looks like this function never gets called. The plugin file calls other hooks that work just fine.

    Any ideas?

    using WP v 3.1.3

Reply

You must log in to post.

About this Topic