E
E
Exbr2017-04-11 16:19:11
uLogin
Exbr, 2017-04-11 16:19:11

How to save ulogin data in WP user profile?

Tell me how to save the phone, city, etc. fields in the standard profile.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
ommunist, 2017-04-20
@ommunist

If ulogin allows you to "take" this data, then something like this:

add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );

function my_show_extra_profile_fields( $user ) { ?>

  <h3>Extra profile information</h3>

  <table class="form-table">

    <tr>
      <th><label for="city">City</label></th>

      <td>
        <input type="text" name="city" id="city" value="<?php echo esc_attr( get_the_author_meta( 'city', $user->ID ) ); ?>" class="regular-text" /><br />
        <span class="description">Please enter your City.</span>
      </td>
    </tr>

  </table>
<?php }

Where in the placeholder value you return what is taken from ulogin, if it gives it back. And if not, then after login you can offer the user to replenish the profile in popup-e.

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question