referrer/userpoints

Scott Falconer - August 25, 2007 - 02:54
Project:User Referral
Version:5.x-1.x-dev
Component:Code: referral
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I found that points were not being added when a user was referred. Seems to be a typo in "$cookie['uid']" at line 201

if (module_exists('userpoints')) {
      $points = variable_get(REFERRAL_USERPOINTS, 1);
      userpoints_userpointsapi('points', $points, $cookie[$uid], 'referral');
    }

should be

if (module_exists('userpoints')) {
      $points = variable_get(REFERRAL_USERPOINTS, 1);
      userpoints_userpointsapi('points', $points, $cookie['uid'], 'referral');
    }

#1

ryan_courtnage - November 13, 2007 - 16:39

I can confirm that this is a bug and the suggested fix works.

#2

blnd - January 18, 2008 - 02:27

I corrected the typo in the module, but it still doesn't work for me. Referrals are reported, but points still not being added. Please help.

#3

j_ten_man - July 5, 2008 - 20:29

I can also confirm this bug and the suggested fix works. Does anyone know what the entity_id is? It has the same typo but I am not sure if it needs to be corrected or not or if has any effect on anything.

#4

CarbonPig - October 24, 2008 - 18:57

Is this also a fix for 6.x ??

Thanks,

The Carbon Pig

#5

Debugger_01 - March 2, 2009 - 12:09
Component:Code» Code: referral

referral-5.x-1.0
output error
Fatal Error: Undefined Function: userpoints_role_userpoints()

referral-5.x-1.x-dev
output error
Undefined Function: ip_address() (it's exists only in drupal 6.x)

I patched dev module. It seems work fine.

#6

Debugger_01 - March 2, 2009 - 12:12
AttachmentSize
patch.txt 1.44 KB

#7

kbahey - March 2, 2009 - 20:36
Status:active» fixed

Fixed in version 5.x-1.x-dev, without the ip_address() function, which does not belong in this module.

Also, ported the userpoints functionality to the D6 version.

The new changes will appear in the -dev tarballs in about 6 hours.

#8

Debugger_01 - March 3, 2009 - 06:40

how about ip_address() function ? It's not exists in drupal 5.

#9

kbahey - March 4, 2009 - 02:07

I think there is a patch that makes this function available for Drupal 5.

If you cannot find it in the issue queue, then put it in its own new module. I don't want something that belongs to core to be in a contrib module.

#10

Debugger_01 - March 4, 2009 - 12:10

This function not belongs in core! And your module uses this function. It exixsts only in drupal 6 core!

#11

kbahey - March 4, 2009 - 12:03

Yes, because it is in core in D6.

#12

Debugger_01 - March 4, 2009 - 12:11

module for 5!

#13

kbahey - March 5, 2009 - 01:18

Changed back D5 to $_SERVER['REMOTE_ADDR'] instead of calling a non-existent function.

#14

Debugger_01 - March 6, 2009 - 04:49

thanks god :)

#15

kbahey - March 6, 2009 - 12:19

You are welcome. Enjoy!

#16

System Message - March 20, 2009 - 12:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.