rules php condition not working

Created on 25 May 2014, almost 11 years ago
Updated 1 April 2023, about 2 years ago

Hello,
I have been trying to use the following php condition to achieve a specific rule required for my project, but I keep failing to match the condition, please help.

$sql = "SELECT `mid` FROM `managed_staff_points` WHERE `uid` = '[userpoints-transaction:user:uid]'  ";
$result = db_query($sql);
if ($result == '[site:current-user:uid]') {
	return TRUE;
else
	return FALSE;
}
💬 Support request
Status

Active

Version

2.0

Component

Code: userpoints_rules

Created by

🇪🇬Egypt naelhussein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024