Forums

Join
bbPress Support ForumsThemesHow to disable DISPLAY_NAME edit for Subscriber Profile

Info

How to disable DISPLAY_NAME edit for Subscriber Profile

  1. Subj.
    I want do disallow ordinary users to edit their display_name in profile.
    How could i do it ?

    For WordPress the problem was solved by adminimize plugin. Maybe such a way for BB exists?

  2. There is a disable display name plugin for this very purpose.

  3. Thanks. But it's not exactly what i wanted to....
    This plugin disables display_name edition capability, and display_name displaying too...
    "user_login" displayed instead of "display_name"

    could anyone help me to fix that plugin to achieve the goal ?
    <?php
    /*
    Plugin Name: Disable Display Name
    Plugin URI: http://bbpress.org/plugins/topic/disable-display-name
    Description: Blocks the alternate Display Name functionality in bbPress 1.x to prevent spoofing other members and admin.
    Version: 0.0.2
    Author: _ck_
    Author URI: http://bbshowcase.org

    License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/

    Donate: http://bbshowcase.org/donate/
    */

    function disable_display_name($display_name="", $id=0){$user = bb_get_user( bb_get_user_id( $id ) ); return $user->user_login;}
    add_filter('get_user_display_name', 'disable_display_name',9,2);
    add_filter('get_post_author', 'disable_display_name',9,2);

    function disable_display_name_keys($keys){unset($keys['display_name']); return $keys;}
    add_filter('get_profile_info_keys', 'disable_display_name_keys',9);

    ?>

  4. You must log in to post.