You are here

function hook_signup_sign_up in Signup 7

Same name and namespace in other branches
  1. 6.2 signup.api.php \hook_signup_sign_up()
  2. 6 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 theme_signup_user_form(), serialized, and stored in the {signup_log} database table.

Parameters

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

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

Return value

array 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()

theme_signup_user_form()

1 function implements hook_signup_sign_up()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

signup_roles_signup_sign_up in modules/signup_roles/signup_roles.module
Implements hook_signup_sign_up().
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 92
This file documents the hooks invoked by the Signup module.

Code

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