Set display name from nickname with register process

Don’t use the hook,instead just use wp_update_user when the form is filled out and you are ready to create the user:

wp_update_user( array ('ID' => $user_id,  'display_name' => $posted['nickname']) ) ;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)