do_action( 'edit_user_profile', WP_User $profileuser )

Fires after the ‘About the User’ settings table on the ‘Edit User’ screen.

Parameters Parameters


(WP_User) The current WP_User object.

Top ↑

Source Source

File: wp-admin/user-edit.php

View on Trac

Top ↑

Changelog Changelog

Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by 1994rstefan

    This action can be used to add a form to the backend user editing screen and save some additional user meta data.

    For example to add a field for the users birthday:

    function userMetaBirthdayForm(WP_User $user) {
    	<table class="form-table">
    			<th><label for="user_birthday">Birthday</label></th>
    					value="<?php echo esc_attr(get_user_meta($user->ID, 'birthday', true)); ?>"
    				<span class="description">Some description to the input</span>
    add_action('show_user_profile', 'userMetaBirthdayForm'); // editing your own profile
    add_action('edit_user_profile', 'userMetaBirthdayForm'); // editing another user
    add_action('user_new_form', 'userMetaBirthdayForm'); // creating a new user
    function userMetaBirthdaySave($userId) {
    	if (!current_user_can('edit_user', $userId)) {
    	update_user_meta($userId, 'birthday', $_REQUEST['user_birthday']);
    add_action('personal_options_update', 'userMetaBirthdaySave');
    add_action('edit_user_profile_update', 'userMetaBirthdaySave');
    add_action('user_register', 'userMetaBirthdaySave');

You must log in before being able to contribute a note or feedback.