um_after_new_user_register

The Ultimate Member um after new user register function.

Description

um_after_new_user_register( $user_id, $args ); 

Parameters (2)

0. $user_id
The user id.
1. $args
The args.

Usage

  1. if ( !function_exists( 'um_after_new_user_register' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/core/um-actions-register.php'; 
  3.  
  4. // The user id. 
  5. $user_id = null; 
  6.  
  7. // The args. 
  8. $args = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = um_after_new_user_register($user_id, $args); 
  12.  

Defined (1)

The function is defined in the following location(s).

/core/um-actions-register.php  
  1. function um_after_new_user_register( $user_id, $args ) { 
  2. global $ultimatemember, $pagenow; 
  3. extract( $args ); 
  4.  
  5. um_fetch_user( $user_id ); 
  6.  
  7. if ( !isset( $args['role'] ) ) { 
  8. $role = um_get_option('default_role'); 
  9.  
  10. if ( $pagenow != 'user-new.php' && !array_key_exists( $role, $ultimatemember->query->get_roles( false, array('admin') ) ) ) { 
  11. $role = um_get_option('default_role'); 
  12.  
  13. $ultimatemember->user->set_role( $role ); 
  14.  
  15. $ultimatemember->user->set_registration_details( $args['submitted'] ); 
  16.  
  17. $ultimatemember->user->set_last_login(); 
  18.  
  19.  
  20. do_action('um_post_registration_save', $user_id, $args); 
  21.  
  22. do_action('um_post_registration_listener', $user_id, $args); 
  23.  
  24. do_action('um_update_profile_full_name', $args ); 
  25.  
  26. do_action('um_post_registration', $user_id, $args); 
  27.  
  28. if( ! is_admin() ) { 
  29. do_action('user_register', $user_id ); 
  30.