I'm trying to set up a view permission based on a webform field. I've been able to get to my custom module using hook_webform_submission_access().
So I have an email field in the webform, and I want to check that based on the current user's email address. Should be pretty simple, I just can't get the field data. Anyone know?
Example: if ($submission->data['field_email'] == $user->mail)
What is the correct syntax instead of $submission->data['field_email']
I'm on Drupal 7 and Webform 4.x branch.