Forums
-
- Forum
- Posts
-
- Installation
- 28,528
- Troubleshooting
- 62,957
- Themes
- 10,453
- Plugins
- 15,405
- Requests & Feedback
- 15,045
- Showcase
- 3,250
-
ok, let’s try setting both
function change_display_name( $user_id ) {
$info = get_userdata( $user_id );
$args = array(
'ID' => $user_id,
'display_name' => $info->user_login );
'nickname' => $info->user_login );
wp_update_user( $args );
}
add_action('user_register','change_display_name');
This should set both display_name and nickname to the username