actually it should work quite equal:
Code:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user SET
options = options - $_USEROPTIONS[showsignatures]
WHERE userid = $bbuserinfo[userid]
AND (options & $_USEROPTIONS[showsignatures])
");
the and options & part checks if it is set , the options - then sets it to no.
and to get the other way round it would be:
Code:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user SET
options = options + $_USEROPTIONS[showsignatures]
WHERE userid = $bbuserinfo[userid]
AND NOT (options & $_USEROPTIONS[showsignatures])
");