Only the $sid is available in hook_webform_draft_alter. For the module developer to modify the $sid, additional context would be helpful -- specifically the webform node id and the user id (even though this is global, it might not be in some future version).

A context array of the form is now passed:

      $context = array(
        'nid' => $nid,
        'uid' => $uid,
      );
      drupal_alter('webform_draft', $sid, $context);

Comments

danchadwick’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Status: Active » Fixed
StatusFileSize
new1.03 KB

Committed to 7.x-4.x and 8.x.

This is a backward-compatible API change.

  • DanChadwick committed 845b5ea on 7.x-4.x
    Issue #2302029 by DanChadwick: Add nid and uid context for...
  • DanChadwick committed 3f68804 on 8.x-4.x
    Issue #2302029 by DanChadwick: Add nid and uid context for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.