function theme_signup_anonymous_username in Signup 7
Same name and namespace in other branches
- 6.2 theme/signup_form.inc \theme_signup_anonymous_username()
- 6 theme/signup_form.inc \theme_signup_anonymous_username()
Returns the value to use for the user name for anonymous signups.
This value is used for the %user_name email token for anonymous users, and also to identify a particular anonymous signup in various places in the UI.
Parameters
array $variables: An array of variables including:
- 'form_data': Array of custom signup form values for the current signup.
- 'email': E-mail address of the anonymous user who signed up.
Return value
string A string with the proper value for the %user_name email token.
See also
1 theme call to theme_signup_anonymous_username()
- _signup_get_username in ./
signup.module - Get the name to use for a given signup.
File
- theme/
signup_form.inc, line 95 - Site-specific code related to the form when users signup for a node.
Code
function theme_signup_anonymous_username($variables) {
$form_data = $variables['form_data'];
$email = $variables['email'];
// Use the name if possible.
if (isset($form_data['Name']) && !empty($form_data['Name'])) {
return $form_data['Name'];
}
return $email;
}