Info
- 4 posts
- 3 voices
- Started 2 years ago by mezinster
- Latest reply from mezinster
- This topic is not resolved
How to disable DISPLAY_NAME edit for Subscriber Profile
-
- Posted 2 years ago #
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?
-
- Posted 2 years ago #
There is a disable display name plugin for this very purpose.
-
- Posted 2 years ago #
-
- Posted 2 years ago #
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.orgLicense: 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);?>
-
You must log in to post.