Would it be possible to expand this module to allow the user to make their whole profile public or private with on click? In an ideal world, there would then also be a separate permission to allow certain users (admins for instance) to still view the profile. This would give users full control over their profile and still allow admins etc. to access it.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | user-profile-panel-setup.png | 73.46 KB | shark |
Comments
Comment #1
coltraneGreat idea, I see a lot of value in this. I'd be surprised if it can't be done by an existing module, some research should be done to see if any other contrib module allows per-user whole profile privacy.
@TfR75 if you have the time it would be useful to spec out this feature more, perhaps provide some use cases and thoughts on the interface. Thanks.
Also, if I start a patch it's going to be for the 6.x branch of profile privacy.
Comment #2
Anonymous (not verified) commentedThanks for the feedback! I did look around for a quite a while and could not find any module that does that. Others seem to have had the same result, see: http://drupal.org/node/433968 or http://drupal.org/node/411490
Suggestion on how it could be implemented: checkbox as part of profile plus new permissions
- give users a checkbox to hide their profile
- add 2 new permission:
-- one for a role to see all profiles despite this privacy setting
-- another one for allowing only certain roles to hide their profile (if this is seen as useful - I would not need it but others might)
- hidden profiles would then be completely inaccessible, apart from those users with the permission to see the hidden profiles
A use case would be our website that currently only allows registered users to see others' profiles. However, we want to make these profiles accessible to everyone, but give our members the choice to hide their profiles from anonymous users.
You could also imagine a site through which people would apply for jobs - potential employers should have the right to see all profiles of job seekers whereas job seekers should not see profiles of their competitors.
I understand that you do not want to develop new functionality for Drupal 5, even though it would be useful for us - but then I hope we can make us of your D6 code if it is not to difficult to port to D5.
Thanks for looking into this!
Comment #3
binarylime commentedThis would be great. Any progress? I'd be happy to be involved in testing. Version 6 for me too please.
Comment #4
elijah lynnI am interested in this feature also.
Subscribing.
Comment #5
nrackleff commentedSubscribing
Interested for Drupal 6
Comment #6
rickyd1 commentedSubscribing for D6
Comment #7
skyredwanghere is my HowTo http://insready.com/node/54
Comment #8
pauldawg commentedGreat job skyredwang; I had been working with Panels and was thinking along the same lines. You just saved me a few precious hours! Here are a few additional suggestions, which I am going to try out as well:
The Panels/Views approach to the user profile is a great approach which makes a lot of things possible without any real programming. You just have to work with Panels for a while if you're not used to it. I was considering theming the User Profile manually, but I don't think I'll need to do much theming, if any.
Comment #9
pauldawg commentedHi skyredwang;
I finally got around to looking at this and I am running up against an issue. In order to show the public profile variant I have to enable anonymous users to access user profiles. However, the selection logic does not seem to be running at all. Rather, the entire redirect is not working at all for the user page if the logged in user is anonymous, and the user can now access all user profiles regardless of whether the "Make profile public" setting is selected for that user.
Any thoughts on what would make Panels fail to display for anonymous users?
Comment #10
skyredwangI am using D6+Panels-3.2,
Yes, you have to adjust permission so that Drupal doesn't deal with access (in other words, the anonymous users can access user pages).
I don't know why your configurations are not working.
For my site, you can see two examples here:
http://greatbrewers.com/users/admin
http://greatbrewers.com/users/skyred
I am skyred on IRC, if you'd like to debug your site with me.
Comment #11
m_z commentedsubscribing
Comment #12
AntiNSA commentedsubscribe
Comment #13
balsamaThanks for the writeup. Great job.
I'm using content profile (instead of the profile module) so I added the checkbox via CCK. I'm having trouble finding the FID for my checkbox in the DB. Does anyone know which table to look in to find it?
Comment #14
balsamaI figured it out. If anyone else is using content profile, you'll need to get the UID from the users table. Here's my code:
Comment #15
cpliakas commentedMoving this to consideration for the 6.x-2.x branch.
Comment #16
liquidcms commenteddoing this in Panels is a cool idea; although a module would be better.. surprised there hasn't been one done yet.. i'll take a look at module approach for D7.
Comment #17
liquidcms commenteddifference between module (real access control) approach and panels:
- panel has a locked out msg (which might be nice); but user links will still be clickable
- real access control will change links to just username and the page will be access denied
merits for both approaches
of course module approach is also much simpler as no set up is required.
Comment #18
shark commentedThe link in #7 does not appear valid any longer. You may try this instead:
http://insready.com/en/blog/3-lines-code-panels3-and-profile-modules-cre...
Comment #19
shark commentedIn Drupal 7, here's the PHP Code to add as a Panels selection rule to test if a profile checkbox is set. When used along with this tutorial (http://insready.com/en/blog/3-lines-code-panels3-and-profile-modules-cre...), can be used to allow users to publish their profiles publicly (attached is a screenshot in case it helps others with the setup).
Note that:
Adjust as necessary.