PDA

View Full Version : Can donate to yourself?


Nathan2006
02-15-2007, 10:46 AM
Hi,

Is there anyway to stop a member from clicking their own donate link in their profile?

And giving them a no permission message?

Thanks for any help :)

Acers
02-15-2007, 11:23 AM
In action.donate.php
find

// verify the user has enough points to donate
if ($vbulletin->userinfo[$vbulletin->options['vbbux_pointsfield']] < $action['finalcost'])
{
// display error, not enough points
eval(standard_error(fetch_error('vbplaza_not_enoug h_points')));
}


below it add

if($vbulletin->userinfo['userid'] == $touser['userid'])
print_no_permission();

Nathan2006
02-15-2007, 02:02 PM
Hi,

Thank you for your reply.

I tried it but its still working once you click on donate on your own profile :(

Acers
02-15-2007, 03:23 PM
are you sure,
this will stop the donation at the next stage. eg once you set the donation amount and click give, it will give you a no permission.

Nathan2006
02-15-2007, 03:31 PM
are you sure,
this will stop the donation at the next stage. eg once you set the donation amount and click give, it will give you a no permission.

Oh yeah :D

Sorry I thought it would come up with the message before that.

Its much better your way I have tested it now and fully working :)

Thank you for your time :)