+ $sql = "update tt_entity_custom_fields set status = null $modified_part".
+ " where entity_type = $entity_type and entity_id = $user_id".
+ " and group_id = $group_id and org_id = $org_id";
+ $affected = $mdb2->exec($sql);
+ if (is_a($affected, 'PEAR_Error'))
+ return false;
+
+ // Mark user as deleted.