At this time the developer has chosen to just use the display_name. I needed the real first and last name plus the email.
What the developer suggested to me was using this plugin:
What this plugin does is replace the existing display_name with what ever you want. It is specifically designed to switch all display_name variables to first and last name. I edited the plugin for my purposes this way to get the desired result for me:
$display_name = trim($_POST['first_name'] . " " . $_POST['last_name'] . "--" . $_POST['user_email']);
$display_name = trim($info->first_name . ' ' . $info->last_name . '--' . $info->user_email);
In your case you would edit those lines this way:
$display_name = trim($_POST['ID']);
$display_name = trim($info->ID);
The plugin uses the wp function, get_userdata(), which collects the following data to be used:
admin_color (Theme of your admin page. Default is fresh.)
So, if you want you can change the display name to what ever you want within these parameters. The downside is that any other program that is display_name will also be affected by this change.
A nice feature that may not be too destructive for the FrontendPM design is to replace display_name with one that is specific for Frontend PM (fep_display_name). Then have options to select how you want the name to display in the program. A similar function to the force-first-last plugin could be used to switch this up. But, for now using the force-first-last plugin is what can be used.
where you want to use only the user ID instead of the name/nicknames?
Many thanks for the fast and very detailed answer! That sounds good because I use everything else but display_name not 🙂
Actually, this affects only the plugin FEP, because I always use user_first/lastname and user_id/name, but inside the plugin everywhere.
Thank you very much for your help!
I have now installed the plugin and adapted according to your description.
It works almost 100% 🙂
Only when I write a new message, I use the following link, in the “To:” is still the display_name displayed instead user_id
<a href='/msg/?fepaction=newmessage&fep_to=$user&message_title= Message for $order_id'>Send Message</a>
Where $user is the user_id
How can I change this?
I have another question when I set the ParentMessage status to pending, I get no emails as admin the new messages are in the pending status, is there a solution?
Thank you for your help!
Sorry, I was wrong, it shows the user_name in the “To:” field.. not the display_name..
how can I change that?
I would try deleting your cache in your browser. I bet some java script is stuck. The to: field is working fine on my end. So, try that out.
Thanks for your reply!
I have now tried it with FF and Chrome.
If I’m logged in as an admin, everything works without problems. I have the user_id everywhere.
If I am logged in as a normal user, then I get no preference to whom I want to send the new message always the user_name (login name) of the corresponding account in the “to” displayed.
Ok. In dashboard>frontendPM>settings>recipiants tab is “Can users send message to other users.” Checked?
- The topic ‘use only the user ID instead of the name’ is closed to new replies.