Skip to:
Content

Opened 20 months ago

Closed 19 months ago

Last modified 19 months ago

#4440 closed enhancement (fixed)

Profile field visibility only to admins

Reported by: mahdiar Owned by: boonebgorges
Milestone: 1.7 Priority: normal
Severity: normal Version: 1.6
Component: XProfile Keywords: needs-testing has-patch
Cc:

Description

Hi
A setting should be add to change Profile field visibility only to admins .
I mean only admins can see some of the profile fields .
Thanks

Attachments (1)

4440.001.patch (3.5 KB) - added by DJPaul 19 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 boonebgorges20 months ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to 1.7
  • Owner set to boonebgorges
  • Status changed from new to assigned

I've gotten a lot of requests for this, so I'm going to move it to 1.7 for further discussion. It's easy enough to add; I want to gauge if others think it would be useful.

comment:2 mahdiar20 months ago

Thanks.
I think it is necessary to collect some important personal information . For example I'd like to collect my users' cell phone number . Maybe they don't like others to know their number .

comment:3 Steve Holland20 months ago

+1 good idea.

comment:5 dcavins19 months ago

I agree that this is a good idea. And one I just bothered Boone about via e-mail, when I should have looked here first.

comment:6 DJPaul19 months ago

  • Keywords needs-testing has-patch added; 2nd-opinion removed

DJPaul19 months ago

comment:7 DJPaul19 months ago

Attached a patch for review; it adds add a "admins only" visibility setting which uses a bp_current_user_can( 'bp_moderate' ) check.

comment:8 boonebgorges19 months ago

This looks good to me (aside from the if/else comment positions, which I find loathsome ;)

comment:9 djpaul19 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6352]) Add an "admins only" visibility option to profile fields. Fixes #4440

comment:10 anointed19 months ago

I want to gauge if others think it would be useful.

Question:

When using multisite, is each user who creates their own blog an admin, thus giving them permission to view the 'admins only' fields?

Also if using the multi-network plugin would that mean that each admin from all the networks have permission to view the 'admins only' fields?

Maybe the intent would be just as well served using is_super_admin()?

Note: See TracTickets for help on using tickets.