_user_forms

Versions
4.6 – 6
_user_forms(&$edit, $account, $category, $hook = 'form')

Retrieve a list of all form elements for the specified category.

▾ 2 functions call _user_forms()

user_profile_form in modules/user/user.pages.inc
Form builder; edit a user account or one of their profile categories.
user_register in modules/user/user.module
Form builder; The user registration form.

Code

modules/user/user.module, line 2493

<?php
function _user_forms(&$edit, $account, $category, $hook = 'form') {
  $groups = array();
  foreach (module_list() as $module) {
    $function = $module .'_user';
    // $edit and $account need to be passed by reference.
    if (function_exists($function) && ($data = $function($hook, $edit, $account, $category))) {
      $groups = array_merge_recursive($data, $groups);
    }
  }
  uasort($groups, '_user_sort');

  return empty($groups) ? FALSE : $groups;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.