• hello
    it would be great to be able to display usernames by default instead of names, and not give the possibility to change this.
    why? because some users put some long ridiculous name…and names can be changed..it’s better to build a reputation with one name, and not be able to change it.
    how can I do this?

    thanks

    https://wordpress.org/plugins/mycred/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hi.

    Where exactly are you looking to “display usernames by default instead of names”?

    Thread Starter dreamsoft

    (@dreamsoft)

    your plugin is showing names, not usernames, doesn’t it?
    so if I have the username dreamsoft, and the name mark, your plugin will show mark. I want it to show dreamsoft 🙂

    Plugin Author myCred

    (@designbymerovingi)

    In the log on the myCRED > Log page it shows your username. In log entries where you can show usernames or other user details it shows whatever template tag you set.

    If you are looking to change what is shown on the Log page then you could use the mycred_log_username filter which allows you to adjust the content of the User column from showing a username to any other user detail.

    Example: Show the users “First Name” field value instead of a username:

    /**
     * Adjust User Column Content
     * @version 1.0
     */
    add_filter( 'mycred_log_username', 'mycred_pro_log_username_column', 10, 2 );
    function mycred_pro_log_username_column( $content, $user_id ) {
    
    	$first_name = get_user_meta( $user_id, 'first_name', true );
    	if ( $first_name != '' )
    		$content = $first_name;
    
    	return $content;
    
    }

    Thread Starter dreamsoft

    (@dreamsoft)

    for example on leaderboard it shows name not username.

    Plugin Author myCred

    (@designbymerovingi)

    If you look at the documentation for the mycred_leaderboard, you will see that you can set the template for what to show on each row. You can change this and use any user related template tags.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘display usernames instead of names’ is closed to new replies.