You are here

function hook_signup_sign_up in Signup 6.2

Same name and namespace in other branches
  1. 6 signup.api.php \hook_signup_sign_up()
  2. 7 signup.api.php \hook_signup_sign_up()

Hook invoked when a signup is being created to gather other signup data.

This hook allows other modules to inject information into the custom signup data for each signup. The array is merged with the values of any custom fields from hook_signup_pane_info(), serialized, and stored in the {signup_log} database table.

Parameters

$node: Fully-loaded node object being signed up to.

$account: Full-loaded user object who is signing up.

Return value

Keyed array of fields to include in the custom data for this signup. The keys for the array are used as labels when displaying the field, so they should be human-readable (and wrapped in t() to allow translation).

See also

signup_sign_up_user()

hook_signup_pane_info()

1 invocation of hook_signup_sign_up()
signup_sign_up_user in ./signup.module
Signs up a user to a node.

File

./signup.api.php, line 151
This file documents the hooks invoked by the Signup module.

Code

function hook_signup_sign_up($node, $account) {
  return array(
    t('Node type') => node_get_types('name', $node->type),
    t('User created') => format_date($account->created),
  );
}