• I created a page template as a user profile page and used this code to display their user info

    <?php global $current_user;
          get_currentuserinfo();
    
          echo 'Username: ' . $current_user->user_login . "\n";
          echo 'User email: ' . $current_user->user_email . "\n";
          echo 'User first name: ' . $current_user->user_firstname . "\n";
          echo 'User last name: ' . $current_user->user_lastname . "\n";
          echo 'User display name: ' . $current_user->display_name . "\n";
          echo 'User ID: ' . $current_user->ID . "\n";
    ?>

    I want to add links where the user can change email and password, but I can’t seem to find the necessary hook for them.

    Any know encountered this particular problem?

Viewing 1 replies (of 1 total)
  • You change your display code above to a FORM, where you put the editable fields into an input field. There is also a submit button, it sends the field values back to your web server where your code takes the values, validates them and updates the database.
    I suggest that you browse some examples of form processing in the plugins here, this is how I learnt this technique.

Viewing 1 replies (of 1 total)
  • The topic ‘How to let users change their email on a page.’ is closed to new replies.