Hi,
I am working on modifying a basic bit of PHP. The logic below is designed to set the role->id to the value defined in an external input file that feeds into the id variable. But, I want to add logic that say if that id is equal to LOW do the if part of the statement that I have attempted to add, else do the else part of the statement (which is the original logic).
Original Logic:
role_assign($role->id, $user->id, 0, $context->id, 0, 0, 0, 'database');
My adding attempt:
if role_assign( $role->id, $userid, 0, $context->id, 0, 0, 1, 'database' );
where id -> 'LOW'
else role_assign($role->id, $user->id, 0, $context->id, 0, 0, 0, 'database');
Can anyone help me sort this out? I am not sure of the php syntax here.
Thanks.