when someone asks to relate to you on a drupal site with user_relationships enabled , it creates a really weird situation if u do not know the person who is requesting the relationship(requester) , to counter this , we can add a small tweak.
We can add a textarea form element to the page where the user is asked to confirm the relationship, the user requesting the relationship can be asked to fill in their details so that the requestee can recognise them . Once this is done the form element is submitted along with the entire form and processed , the requester details are entered into a separate table which are later retrieved for display on the "pending relationships" page for the requestee . The form elements can look like below :

	$form['requester_details'] = array(
		'#type' => 'textarea',
		'#size' => 100,
		'#required' => TRUE,
		'#title' => t('Please enter your details'),
	);

	$form['submit'] = array(
		'#type' => 'submit',
		'#value' => t('Create relationship')
	);

	return $form ;

now we need to create a table to store the details here is the query for that :

create table user_relationships_requester_details ( requesteruid int(11), requesteeuid int(11), details longtext);

after this we have to process the submitted form and insert the values in to the table as follows :

		$result_details = db_query("INSERT INTO {user_relationships_requester_details} VALUES (%d,%d,'%s')",$user->uid,$requestee->uid,$_POST['requester_details']);

		if($result_details){
			drupal_set_message("Details registered");
		}
		else{
			drupal_set_message("Error occured during processing details");
		}

now after we have done this , while we are displaying the pending relationships for the requestee we have display the above as Requester details, which can be done by editing user_relationships_theme.inc and adding the following code :


	$requester_details = db_result(db_query("SELECT details FROM {user_relationships_requester_details} WHERE requesteruid = %d AND requesteeuid = %d",$relationship->requester_id,$relationship->requestee_id));
	if($relationship->requester_id == $user->uid)
	{
		$rows[]    =  array(t("<b><br> My Details: </b><br>".$mentee_details."<br><br>"));
	}
	else
	{
		$rows[]    =  array(t("<b><br> Requestee Details: </b><br>".$mentee_details."<br><br>"));			
	}

there is one "twist" in this , here in the above code , i have used a check

if($relationship->requester_id == $user->uid)

this is required because if the requester himself is seeing his pending relationships then he will see the details he entered as My details and not Requestee Details.

These tweaks have been applied to MentorCorner , the site is still under development, but u can see these features in action when u try to associate with anyone from the "mentor pool " or the "mentor gallery".

Have fun :-).

Comments

Berdir’s picture

Status: Needs review » Closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the corresponding modules anymore. Therefore, I'm closing all old issues which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature is still needed or the bug still exists and open a new issue in that case.