Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Populating custom fields after registration
- function ch_s2_registration_field_population() {
- global $current_user;
- get_currentuserinfo();
- // Do only at the first login of the user
- // if ( get_user_field('s2member_login_counter') < 2) {
- $s2user_country = get_user_field( 'user_country' );
- $um_country = get_user_meta( $current_user->ID, 'user_country', true );
- if ( $um_country == '' && $s2user_country != '' ) {
- update_user_meta( $current_user->ID, 'user_country', $s2user_country );
- }
- // }
- }
- add_action('wp_head', 'ch_s2_registration_field_population', 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement