Is is possible to show the "current user" referrer with a php snippet?

okday - November 16, 2007 - 04:01
Project:User Referral
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Hi,

I want to know if it is possible to show a user referrer with a php snippet. Is is possible to show the "current user" referrer with a php snippet on a page or a block?

Thank you.

#1

Damion - February 12, 2008 - 19:06

I would also like to know how to do this.

simple code to put in a block would be great:

get referrer_uid where uid = $uid //get the referrer uid
print 'referred by < br>' . referrer_uid->profile_custom_name . '< br>' . profile_username($user);

Got the quick and easy way to pull this?

#2

Damion - February 13, 2008 - 05:40

I got it to work for anyone interested.

You can see thread at http://drupal.org/node/221018#comment-727794

#3

kbahey - February 13, 2008 - 21:49
Status:active» postponed (maintainer needs more info)

If you can make this into a patch, using hook_block, then it would be a nice feature to have.

#4

rmacleod - March 12, 2008 - 22:46

It seems that the code listed at the following link, actually shows the Referrer ID for the owner or creator of the node. Not the user who is logged in.

http://drupal.org/node/221018#comment-727794

Does anyone have an idea on how to adapt it to show the referrer of the logged in person.

Also, is it possible to show the referrer info on the thank you page that is shown after someone signs up to the site.

So a newly referred person will see the name and website of the user that referred them to the site.

Cheers!
Thanks
Rick M.

 
 

Drupal is a registered trademark of Dries Buytaert.