You are here

function _genpass_get_form_item in Generate Password 6

Same name and namespace in other branches
  1. 8 genpass.module \_genpass_get_form_item()
  2. 7 genpass.module \_genpass_get_form_item()

Helper function to find a item in the user form, since its position within the form-array depends on the profile module (account-category).

2 calls to _genpass_get_form_item()
genpass_form_alter in ./genpass.module
Implementation of hook_form_alter()
genpass_register_validate in ./genpass.module
User registration validation.

File

./genpass.module, line 60

Code

function &_genpass_get_form_item(&$form, $field) {
  if (isset($form['account'][$field])) {
    return $form['account'][$field];
  }
  else {
    return $form[$field];
  }
}