• Alex Spataru

    (@alexandrubr)


    Hey there,

    I’m wondering if you could insert some actions on public/class-servicebot-public.php:

    function servicebot_ajax_create_user() {
    
       .......................
    	
    	//On success
    	if ( ! is_wp_error( $user_id ) ) {
    
    		// Some action
    
    	}else{
    
    		// Some other action	
    
    	}
    
       .......................
    
      }

    By doing this, it will be easier for a developer to know that a user was inserted from your plugin and not from anywhere else.

    I would also be nice if some other meta data would be passed as well (for example the subscription plan that the client just paid).

    Also, this 'role' => 'subscriber', I’m sure that can be improved. Maybe somebody has a custom role (and trying to automate the sign up process).

    Best wishes,
    Alex

Viewing 1 replies (of 1 total)
  • Plugin Author servicebot

    (@servicebot)

    Hi Alex,
    Thanks for the great suggestions! Added the events and metadata to the task list. And we have plans to improve the ‘role’ functionality. We would like to have the ability to select the role set on the admin page, as well as different roles per tier. Would love to hear any suggestions you have.
    Thanks,
    Kevin

Viewing 1 replies (of 1 total)
  • The topic ‘Hook on user insert’ is closed to new replies.