I have a block that currently uses the user-specific visibility setting "Hide this block by default but let individual users show it". This requires that the user navigate to edit "My Account", scroll to find the poorly labeled check box and remember to click "Save".

I'd rather the user be able to change the setting with one click (of a button on a node), changing the visibility setting for that user for that block directly in the database using a SQL Update query.

I think I can write a php script to do this, but I don't know where in the Drupal database to find this visibility setting and how it's linked to the specific user. Can anyone help out?

Thanks,
Chrys