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
I can confirm that this is a bug and the suggested fix works.
#2
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
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
Is this also a fix for 6.x ??
Thanks,
The Carbon Pig
#5
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
#7
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
how about ip_address() function ? It's not exists in drupal 5.
#9
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
This function not belongs in core! And your module uses this function. It exixsts only in drupal 6 core!
#11
Yes, because it is in core in D6.
#12
module for 5!
#13
Changed back D5 to $_SERVER['REMOTE_ADDR'] instead of calling a non-existent function.
#14
thanks god :)
#15
You are welcome. Enjoy!
#16
Automatically closed -- issue fixed for 2 weeks with no activity.