Support Forum
Since I'm converting from phpbb, all my users are imported to wordpress, and their usernames - as they know them - has been made as wordpress nicknames.
Is there any way I can change this in either the functions-file or in the forum-settings, so that the users displayname is replaced by WP-nickname?
I need this to be WP Nickname
No, afraid not - at least without hacking core code...
why not just make the display name be the nickname?? this is the firs time anyone has requested such a thing... also, users are not required to have a nickname so it could get dicey and problematic. initially its the same as the display name...
I can make a note of this and consider adding that into the display options in the future...
Visit Cruise Talk Central and Mr Papa's World
You guys are so quick to respond I like that!
I heard you were on vacation Mr Papa, hope you had a nice trip!
I understand that this is a special request, and I'm sure I will work it our somehow.. But what did you mean by
why not just make the display name be the nickname??
I can do it and easiest way possible, so if you have anymore to say about how I can do that - please let me know.
well, I guess your import script is already done, right? so you would need to right another short php script and run it once...
something like this:
global $wpdb; $users = $wpdb->get_col("SELECT ID FROM $wpdb->users"); foreach ($users as $user) { $nickname = get_user_meta($user, 'nickname', $single); $wpdb->query("UPDATE $wpdb->users SET display_name='$nickname' WHERE ID=$user"); }
though I have not actually tested it... but it grabs all the user ids, fetchs the nickname for each user and sets the display name to the nickname for each user id...
Visit Cruise Talk Central and Mr Papa's World
ah, said I hadnt tested it...
change
$nickname = get_user_meta($user, 'nickname', $single);
to
$nickname = get_user_meta($user, 'nickname', true);
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)