Already found it. Changed it in the php files chat en form
changed the after the last arrow to user_firstname
$logged_username = $current_user->user_firstname;
Glad you found a solution. I’ll add a filter for this in the next update, so you won’t need to modify any core files, which is not recommended.
Just to follow up with this, the next version of the plugin includes a filter hook sac_logged_username
that enables modifying of the logged-in username. Thank you for the feedback.
Oke… not an expert on this area… how does this work?
There are lots of things that can be done via filter hooks, but for your case try adding the following code to your theme’s functions.php file (or via a custom plugin):
// customize the logged-in username
function sac_customize_logged_username($logged_username, $current_user) {
$logged_username = $current_user->user_firstname;
return $logged_username;
}
add_filter('sac_logged_username', 'sac_customize_logged_username', 10, 2);
You can see where the same modification is applied via this function. That way, there is no need to modify the core plugin files, and so the change will remain in place even if the plugin is updated.
Thanks. Put it in a custom plugin.
🙂 It does work on the name display. But in the chat the name stays full after posting a message.
Ah well will have to look at it again and try to get another update out with more hooks. Should be available sometime tomorrow depending on workload.
Hey got this fixed up with version 20171103. Should be good to go using that previous snippet, works for all logged username instances.
Works perfectly 🙂 Thanks a lot!