Update only if in a specific group
Posted: 2019-04-28 12:23
Hello board, Ian trying to stop an update from happening if the user is. It in a certain group. It doesn’t seem to work, can someone help?
Code: Select all
function commission_approvals_before_update($data, $memberInfo, &$args){
if($memberinfo['groupID']!='3'){
$id=makesafe($selectedID);
$complete=sqlValue("select `ClaimCompleted` from `commission_approvals` where `refnum`='$id'");
if($complete=='Claim Complete') return FALSE;
}
return TRUE;
}