Hi everybody,

I'm building a site where people(employers) will post small jobs for other's(seekers) to bid on and respond. I can't figure out how to protect the privacy of the seekers. When the seekers create their profile, I want them to specify some 'private' and 'public' values. When they bid for a job, the employer is able to the 'private' details. Otherwise general public is only able to the 'public' details.

I explored views, cck, node family, node profile, node relationships, and currently I have a coder's block (if there's such a thing).

Any hints?

Thank you.

Comments

zilla’s picture

so one EASY "aha" idea for you: users create only private profiles (the fields and attributes that you may require to route jobs down the road based on such parameters)

BUT you then do this:

create a user type: 'seeker'

create a new content type: 'seeker profile'

using CCK (if desired) add assorted fields to the 'seeker profile'

in instructions for use, make it clear to 'seekers' that all information in 'seeker profile' is public (to buyers)

give seekers create/edit etc permissions on 'seeker profile' - but give the buyers only 'view and access'

NOW you will have a whole set of very robust 'seeker profiles' that can be searched by your site engine in new ways (open text etc) - if you're on drupal6 you can actually explore this with contentprofile module which allows you to turn any content type into a 'profile' and display as the user's 'profile page' (and CCK works there too and so on)

illSleepWheniDie’s picture

Thanks Zilla for helping me, however I'm a little lost, so please bear with my newbie questions.

  1. users only create private profiles --- How do I enable this?
  2. create a user type: 'seeker' --- OK
  3. create a new content type: 'seeker profile' --- OK
  4. add assorted fields to the 'seeker profile' --- OK
  5. make it clear to 'seekers' that all information in 'seeker profile' is public --- Uh huh, Got it
  6. give seekers [RW] permissions on 'seeker profile' - but give the buyers only [R] --- OK

So when seekers create their profiles they know it's all public and will have to put in data accordingly? Correct me if I misunderstood you.

Employers are not supposed to see contact details at first. But when the seeker bids on a job post, employer is able to read their contact details. So seekers must enter private and public data initially, and later only specific employers can see those private details.

Blitter’s picture

Employers are not supposed to see contact details at first. But when the seeker bids on a job post, employer is able to read their contact details. So seekers must enter private and public data initially, and later only specific employers can see those private details.

This could all be achieved with the signup module, it can pull private fields from the stock profile and present them as a list of users in a node. And the permissions are structured in such a way that it can do exactly what you need.

jaydub’s picture

how about profile_privacy module?

http://drupal.org/project/profile_privacy

illSleepWheniDie’s picture

Thanks, this is part of the solution. However I want to allow them to grant access to selected people also.

E.g 1. My gender and birthdate are private to general public, but I when I comment on a blog I want the blog author to be able to see all my details.

E.g 2. My contact details are set to private, but when I respond to a job post, I want that particular employer to be able to see my contact details and contact me back.

Thanks again =)

illSleepWheniDie’s picture

Hi, this is my solution.

I'm using node_comment module to define the 'bid' contenttype as comment to 'job_post' content type.

What I did was everytime a seeker's profile is viewed, I query whether the seeker had ever replied to any of the visitor's posts. Then private fields are shown.

let me know if there is a better way. Thanks all for the help, even if I did not use your inputs, I learnt a lot!

change this (profile.module):

function profile_view_profile($user) {

  profile_load_profile($user);
  // Show private fields to administrators and people viewing their own account.
  if (user_access('administer users') || $GLOBALS['user']->uid == $user->uid  ) {

to this:

function profile_view_profile($user) {

  profile_load_profile($user);
 
//-- addition 
  $true_employer = false;
  $result = db_query('SELECT distinct(uid) FROM `node` WHERE nid IN (SELECT DISTINCT nid FROM `node_comments` WHERE name = "%s" )', $user->name);

  while ($field = db_fetch_object($result)){
    if ($field -> uid == $GLOBALS['user']->uid){
	   $true_employer = true;
	}
  }
//-- end addition

  // Show private fields to administrators and people viewing their own account.
  if (user_access('administer users') || $GLOBALS['user']->uid == $user->uid || $true_employer ) {

Don't forget to change the last line. Also don't sue me if this crashed ur system - it works for me, but no gurantees with any other configurations =)