Any way to flag users who previously submitted a webform on revisit? My business team needs users who submitted a specific form to be flagged in order to allow them to gain access to a certain piece of content, which we've hidden behind a conditional check on whether they have the flag or not. I understand how to set up a form action to raise a flag on a given user. Unfortunately, I didn't know there was a requirement to flag users until most had already submitted the form.

I'm wondering if there's anything I can do, now that the horse is out of the barn and a number of users have already submitted the form without getting flagged, to ask users to revisit the form and, if they've already submitted it once, just:

a. get the flag raised
b. get redirected to the page with the restricted content
The table webform_submission has everything you need. The webform nid and the uid.

You could implement hook_user_login and set a flag in the current $user object if the form has been submitted. Then check for this flag where ever you need it.