diff --git a/core/modules/user/tests/user_form_test.module b/core/modules/user/tests/user_form_test.module
index 4e907f3..d2b07d7 100644
--- a/core/modules/user/tests/user_form_test.module
+++ b/core/modules/user/tests/user_form_test.module
@@ -23,7 +23,7 @@ function user_form_test_menu() {
 }
 
 /**
- * A test form for user_validate_current_pass().
+ * Form constructor for test form for user_validate_current_pass().
  */
 function user_form_test_current_password($form, &$form_state, $account) {
   $account->user_form_test_field = '';
@@ -35,7 +35,7 @@ function user_form_test_current_password($form, &$form_state, $account) {
     '#description' => t('A field that would require a correct password to change.'),
     '#required' => TRUE,
   );
-  
+
   $form['current_pass'] = array(
     '#type' => 'password',
     '#title' => t('Current password'),
@@ -57,7 +57,7 @@ function user_form_test_current_password($form, &$form_state, $account) {
 }
 
 /**
- * Submit function for the test form for user_validate_current_pass().
+ * Form submission handler for user_form_test_current_password().
  */
 function user_form_test_current_password_submit($form, &$form_state) {
   drupal_set_message(t('The password has been validated and the form submitted successfully.'));
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index f7d4552..52a1e78 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -5,6 +5,9 @@
  * Admin page callback file for the user module.
  */
 
+/**
+ * Page callback: Shows the user management page.
+ */
 function user_admin($callback_arg = '') {
   $op = isset($_POST['op']) ? $_POST['op'] : $callback_arg;
 
@@ -26,10 +29,10 @@ function user_admin($callback_arg = '') {
 }
 
 /**
- * Form builder; Return form for user administration filters.
+ * Form constructor for user administration search filters.
  *
- * @ingroup forms
  * @see user_filter_form_submit()
+ * @ingroup forms
  */
 function user_filter_form() {
   $session = isset($_SESSION['user_overview_filter']) ? $_SESSION['user_overview_filter'] : array();
@@ -104,7 +107,7 @@ function user_filter_form() {
 }
 
 /**
- * Process result from user administration filter form.
+ * Form submission handler for user_filter_form_submit().
  */
 function user_filter_form_submit($form, &$form_state) {
   $op = $form_state['values']['op'];
@@ -134,11 +137,11 @@ function user_filter_form_submit($form, &$form_state) {
 }
 
 /**
- * Form builder; User administration page.
+ * Form constructor for the user administration page.
  *
- * @ingroup forms
  * @see user_admin_account_validate()
  * @see user_admin_account_submit()
+ * @ingroup forms
  */
 function user_admin_account() {
 
@@ -223,7 +226,9 @@ function user_admin_account() {
 }
 
 /**
- * Submit the user administration update form.
+ * Form submission handler for user_admin_account().
+ *
+ * @see user_admin_account_validate()
  */
 function user_admin_account_submit($form, &$form_state) {
   $operations = module_invoke_all('user_operations', $form, $form_state);
@@ -244,6 +249,11 @@ function user_admin_account_submit($form, &$form_state) {
   }
 }
 
+/**
+ * Form validation handler for user_admin_account().
+ *
+ * @see user_admin_account_submit()
+ */
 function user_admin_account_validate($form, &$form_state) {
   $form_state['values']['accounts'] = array_filter($form_state['values']['accounts']);
   if (count($form_state['values']['accounts']) == 0) {
@@ -252,10 +262,10 @@ function user_admin_account_validate($form, &$form_state) {
 }
 
 /**
- * Form builder; Configure user settings for this site.
+ * Form constructor for the user settings form.
  *
- * @ingroup forms
  * @see system_settings_form()
+ * @ingroup forms
  */
 function user_admin_settings() {
   // Settings for anonymous users.
@@ -642,11 +652,11 @@ function user_admin_settings() {
 }
 
 /**
- * Menu callback: administer permissions.
+ * Form constructor for the administer permissions form.
  *
- * @ingroup forms
  * @see user_admin_permissions_submit()
  * @see theme_user_admin_permissions()
+ * @ingroup forms
  */
 function user_admin_permissions($form, $form_state, $rid = NULL) {
 
@@ -725,9 +735,7 @@ function user_admin_permissions($form, $form_state, $rid = NULL) {
 }
 
 /**
- * Save permissions selected on the administer permissions page.
- *
- * @see user_admin_permissions()
+ * Form submssion handler for user_admin_permissions().
  */
 function user_admin_permissions_submit($form, &$form_state) {
   foreach ($form_state['values']['role_names'] as $rid => $name) {
@@ -815,10 +823,10 @@ function theme_user_permission_description($variables) {
 }
 
 /**
- * Form to re-order roles or add a new one.
+ * Form constructor for the user roles add and order form.
  *
- * @ingroup forms
  * @see theme_user_admin_roles()
+ * @ingroup forms
  */
 function user_admin_roles($form, $form_state) {
   $roles = user_roles();
@@ -869,7 +877,7 @@ function user_admin_roles($form, $form_state) {
 }
 
 /**
- * Form submit function. Update the role weights.
+ * Form submission handler for user_admin_roles().
  */
 function user_admin_roles_order_submit($form, &$form_state) {
   foreach ($form_state['values']['roles'] as $rid => $role_values) {
@@ -921,11 +929,11 @@ function theme_user_admin_roles($variables) {
 }
 
 /**
- * Form to configure a single role.
+ * Form constructor for the configure role form.
  *
- * @ingroup forms
  * @see user_admin_role_validate()
  * @see user_admin_role_submit()
+ * @ingroup forms
  */
 function user_admin_role($form, $form_state, $role) {
   if ($role->rid == DRUPAL_ANONYMOUS_RID || $role->rid == DRUPAL_AUTHENTICATED_RID) {
@@ -965,7 +973,9 @@ function user_admin_role($form, $form_state, $role) {
 }
 
 /**
- * Form validation handler for the user_admin_role() form.
+ * Form validation handler for user_admin_role().
+ *
+ * @see user_admin_role_submit()
  */
 function user_admin_role_validate($form, &$form_state) {
   if (!empty($form_state['values']['name'])) {
@@ -987,7 +997,9 @@ function user_admin_role_validate($form, &$form_state) {
 }
 
 /**
- * Form submit handler for the user_admin_role() form.
+ * Form submission handler for the user_admin_role() form.
+ *
+ * @see user_admin_role_validate()
  */
 function user_admin_role_submit($form, &$form_state) {
   $role = (object) $form_state['values'];
@@ -1004,14 +1016,19 @@ function user_admin_role_submit($form, &$form_state) {
 }
 
 /**
- * Form submit handler for the user_admin_role() form.
+ * Form submission handler for user_admin_role().
+ *
+ * Called when a user clicks on the 'Delete Role' button. Redirects the user to
+ * a confirmation dialogue.
  */
 function user_admin_role_delete_submit($form, &$form_state) {
   $form_state['redirect'] = 'admin/people/permissions/roles/delete/' . $form_state['values']['rid'];
 }
 
 /**
- * Form to confirm role delete operation.
+ * Form constructor for the confirm role delete form.
+ *
+ * @see user_admin_role_delete_confirm_submit()
  */
 function user_admin_role_delete_confirm($form, &$form_state, $role) {
   $form['rid'] = array(
@@ -1022,7 +1039,7 @@ function user_admin_role_delete_confirm($form, &$form_state, $role) {
 }
 
 /**
- * Form submit handler for user_admin_role_delete_confirm().
+ * Form submission handler for user_admin_role_delete_confirm().
  */
 function user_admin_role_delete_confirm_submit($form, &$form_state) {
   user_role_delete((int) $form_state['values']['rid']);
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 752d3d4..bf9b5ec 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -195,19 +195,20 @@ function hook_user_format_name_alter(&$name, $account) {
 /**
  * Add mass user operations.
  *
- * This hook enables modules to inject custom operations into the mass operations
- * dropdown found at admin/people, by associating a callback function with
- * the operation, which is called when the form is submitted. The callback function
- * receives one initial argument, which is an array of the checked users.
+ * This hook enables modules to inject custom operations into the mass
+ * operations dropdown found at admin/people, by associating a callback function
+ * with the operation, which is called when the form is submitted. The callback
+ * function receives one initial argument, which is an array of the checked
+ * users.
  *
  * @return
  *   An array of operations. Each operation is an associative array that may
  *   contain the following key-value pairs:
- *   - "label": Required. The label for the operation, displayed in the dropdown menu.
- *   - "callback": Required. The function to call for the operation.
- *   - "callback arguments": Optional. An array of additional arguments to pass to
- *     the callback function.
- *
+ *   - label: Required. The label for the operation, displayed in the dropdown
+ *     menu.
+ *   - callback: Required. The function to call for the operation.
+ *   - callback arguments: Optional. An array of additional arguments to pass
+ *     to the callback function.
  */
 function hook_user_operations() {
   $operations = array(
@@ -356,14 +357,15 @@ function hook_user_view($account, $view_mode, $langcode) {
 /**
  * The user was built; the module may modify the structured content.
  *
- * This hook is called after the content has been assembled in a structured array
- * and may be used for doing processing which requires that the complete user
- * content structure has been built.
+ * This hook is called after the content has been assembled in a structured
+ * array and may be used for doing processing which requires that the complete
+ * user content structure has been built.
  *
  * If the module wishes to act on the rendered HTML of the user rather than the
- * structured content array, it may use this hook to add a #post_render callback.
- * Alternatively, it could also implement hook_preprocess_user_profile(). See
- * drupal_render() and theme() documentation respectively for details.
+ * structured content array, it may use this hook to add a #post_render
+ * callback. Alternatively, it could also implement
+ * hook_preprocess_user_profile(). See drupal_render() and theme() documentation
+ * respectively for details.
  *
  * @param $build
  *   A renderable array representing the user.
diff --git a/core/modules/user/user.entity.inc b/core/modules/user/user.entity.inc
index 5549c77..6c12235 100644
--- a/core/modules/user/user.entity.inc
+++ b/core/modules/user/user.entity.inc
@@ -12,6 +12,9 @@
  */
 class UserController extends DrupalDefaultEntityController {
 
+  /**
+   * Implements DrupalDefaultEntityController::attachLoad().
+   */
   function attachLoad(&$queried_users, $revision_id = FALSE) {
     // Build an array of user picture IDs so that these can be fetched later.
     $picture_fids = array();
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 928daad..e02bea7 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -32,7 +32,7 @@ const USER_REGISTER_VISITORS = 1;
 const USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL = 2;
 
 /**
- * Implement hook_help().
+ * Implements hook_help().
  */
 function user_help($path, $arg) {
   global $user;
@@ -263,7 +263,7 @@ function user_external_load($authname) {
 }
 
 /**
- * Load multiple users based on certain conditions.
+ * Loads multiple users based on certain conditions.
  *
  * This function should be used whenever you need to load more than one user
  * from the database. Users are loaded into memory and will not require
@@ -284,13 +284,12 @@ function user_external_load($authname) {
  * @return
  *   An array of user objects, indexed by uid.
  *
+ * @todo Remove $conditions in Drupal 8.
  * @see entity_load()
  * @see user_load()
  * @see user_load_by_mail()
  * @see user_load_by_name()
  * @see EntityFieldQuery
- *
- * @todo Remove $conditions in Drupal 8.
  */
 function user_load_multiple($uids = array(), $conditions = array(), $reset = FALSE) {
   return entity_load('user', $uids, $conditions, $reset);
@@ -305,8 +304,8 @@ function user_load_multiple($uids = array(), $conditions = array(), $reset = FAL
  * variable, generally $account. If you actually do want to act as the user you
  * are loading, it is essential to call drupal_save_session(FALSE); first.
  * See
- * @link http://drupal.org/node/218104 Safely impersonating another user @endlink
- * for more information.
+ * @link http://drupal.org/node/218104 Impersonating another user @endlink for
+ * more information.
  *
  * @param $uid
  *   Integer specifying the user ID to load.
@@ -326,10 +325,11 @@ function user_load($uid, $reset = FALSE) {
 }
 
 /**
- * Fetch a user object by email address.
+ * Fetches a user object by email address.
  *
  * @param $mail
  *   String with the account's e-mail address.
+ *
  * @return
  *   A fully-loaded $user object upon successful user load or FALSE if user
  *   cannot be loaded.
@@ -342,10 +342,11 @@ function user_load_by_mail($mail) {
 }
 
 /**
- * Fetch a user object by account name.
+ * Fetches a user object by account name.
  *
  * @param $name
  *   String with the account's user name.
+ *
  * @return
  *   A fully-loaded $user object upon successful user load or FALSE if user
  *   cannot be loaded.
@@ -358,7 +359,7 @@ function user_load_by_name($name) {
 }
 
 /**
- * Save changes to a user account or add a new user.
+ * Saves changes to a user account, or adds a new user.
  *
  * @param $account
  *   (optional) The user object to modify or add. If you want to modify
@@ -373,7 +374,8 @@ function user_load_by_name($name) {
  *   serialized and saved in the {users.data} column.
  *
  * @return
- *   A fully-loaded $user object upon successful save or FALSE if the save failed.
+ *   A fully-loaded $user object upon successful save or FALSE if the save
+ *   failed.
  *
  * @todo D8: Drop $edit and fix user_save() to be consistent with others.
  */
@@ -571,7 +573,7 @@ function user_save($account, $edit = array()) {
 }
 
 /**
- * Verify the syntax of the given name.
+ * Verifies the syntax of a given name.
  */
 function user_validate_name($name) {
   if (!$name) {
@@ -652,7 +654,7 @@ function user_validate_picture(&$form, &$form_state) {
 }
 
 /**
- * Generate a random alphanumeric password.
+ * Generates a random alphanumeric password.
  */
 function user_password($length = 10) {
   // This variable contains the list of allowable characters for the
@@ -679,7 +681,7 @@ function user_password($length = 10) {
 }
 
 /**
- * Determine the permissions for one or more roles.
+ * Determines the permissions for one or more roles.
  *
  * @param $roles
  *   An array whose keys are the role IDs of interest, such as $user->roles.
@@ -725,7 +727,7 @@ function user_role_permissions($roles = array()) {
 }
 
 /**
- * Determine whether the user has a given privilege.
+ * Determines whether the user has a given privilege.
  *
  * @param $string
  *   The permission, such as "administer nodes", being checked for.
@@ -775,7 +777,8 @@ function user_access($string, $account = NULL) {
 /**
  * Checks for usernames blocked by user administration.
  *
- * @return boolean TRUE for blocked users, FALSE for active.
+ * @return bool
+ *   TRUE for blocked users, FALSE for active.
  */
 function user_is_blocked($name) {
   return db_select('users')
@@ -927,7 +930,7 @@ function user_user_view($account) {
 }
 
 /**
- * Helper function to add default user account fields to user registration and edit form.
+ * Adds default user account fields to user registration and edit form.
  *
  * @see user_account_form_validate()
  * @see user_validate_current_pass()
@@ -1107,9 +1110,7 @@ function user_account_form(&$form, &$form_state) {
 }
 
 /**
- * Form validation handler for the current password on the user_account_form().
- *
- * @see user_account_form()
+ * Form validation handler for the current password in user_account_form().
  */
 function user_validate_current_pass(&$form, &$form_state) {
   $account = $form['#user'];
@@ -1132,8 +1133,6 @@ function user_validate_current_pass(&$form, &$form_state) {
 
 /**
  * Form validation handler for user_account_form().
- *
- * @see user_account_form()
  */
 function user_account_form_validate($form, &$form_state) {
   $account = $form['#user'];
@@ -1205,6 +1204,9 @@ function user_user_presave(&$edit, $account) {
   }
 }
 
+/**
+ * Form constructor for the user login block.
+ */
 function user_login_block($form) {
   $form['#action'] = url($_GET['q'], array('query' => drupal_get_destination()));
   $form['#id'] = 'user-login-form';
@@ -1372,15 +1374,13 @@ function user_preprocess_block(&$variables) {
 }
 
 /**
- * Format a username.
+ * Formats a username.
  *
  * By default, the passed-in object's 'name' property is used if it exists, or
  * else, the site-defined value for the 'anonymous' variable. However, a module
  * may override this by implementing
  * hook_user_format_name_alter(&$name, $account).
  *
- * @see hook_user_format_name_alter()
- *
  * @param $account
  *   The account object for the user whose name is to be formatted.
  *
@@ -1388,6 +1388,8 @@ function user_preprocess_block(&$variables) {
  *   An unsanitized string with the username to display. The code receiving
  *   this result must ensure that check_plain() is called on it before it is
  *   printed to the page.
+ *
+ * @see hook_user_format_name_alter()
  */
 function user_format_name($account) {
   $name = !empty($account->name) ? $account->name : variable_get('anonymous', t('Anonymous'));
@@ -1396,7 +1398,7 @@ function user_format_name($account) {
 }
 
 /**
- * Process variables for user-picture.tpl.php.
+ * Preprocesses variables for user-picture.tpl.php.
  *
  * The $variables array contains the following arguments:
  * - $account: A user, node or comment object with 'name', 'uid' and 'picture'
@@ -1578,15 +1580,24 @@ function theme_user_list($variables) {
   return theme('item_list', array('items' => $items, 'title' => $title));
 }
 
+/**
+ * Checks whether the current user is anonymous.
+ */
 function user_is_anonymous() {
   // Menu administrators can see items for anonymous when administering.
   return !$GLOBALS['user']->uid || !empty($GLOBALS['menu_admin']);
 }
 
+/**
+ * Checks whether the current user is logged in.
+ */
 function user_is_logged_in() {
   return (bool) $GLOBALS['user']->uid;
 }
 
+/**
+ * Checks whether a user is allowed to register.
+ */
 function user_register_access() {
   return user_is_anonymous() && variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
 }
@@ -1939,17 +1950,18 @@ function user_uid_only_optional_to_arg($arg) {
 }
 
 /**
- * Load either a specified or the current user account.
+ * Loads a user account; if none is specified, returns the current user.
  *
  * @param $uid
  *   An optional user ID of the user to load. If not provided, the current
  *   user's ID will be used.
+ *
  * @return
  *   A fully-loaded $user object upon successful user load, FALSE if user
  *   cannot be loaded.
  *
- * @see user_load()
  * @todo rethink the naming of this in Drupal 8.
+ * @see user_load()
  */
 function user_uid_optional_load($uid = NULL) {
   if (!isset($uid)) {
@@ -1988,10 +2000,11 @@ function user_page_title($account) {
 }
 
 /**
- * Discover which external authentication module(s) authenticated a username.
+ * Discovers which external authentication module(s) authenticated a username.
  *
  * @param $authname
  *   A username used by an external authentication module.
+ *
  * @return
  *   An associative array with module as key and username as value.
  */
@@ -2001,15 +2014,17 @@ function user_get_authmaps($authname = NULL) {
 }
 
 /**
- * Save mappings of which external authentication module(s) authenticated
- * a user. Maps external usernames to user ids in the users table.
+ * Saves a list of which external authentication module(s) authenticated a user.
+ *
+ * Maps external usernames to user ids in the users table.
  *
  * @param $account
  *   A user object.
  * @param $authmaps
  *   An associative array with a compound key and the username as the value.
- *   The key is made up of 'authname_' plus the name of the external authentication
- *   module.
+ *   The key is made up of 'authname_' plus the name of the external
+ *   authentication module.
+ *
  * @see user_external_login_register()
  */
 function user_set_authmaps($account, $authmaps) {
@@ -2034,8 +2049,10 @@ function user_set_authmaps($account, $authmaps) {
 }
 
 /**
- * Form builder; the main user login form.
+ * Form constructor for the user login form.
  *
+ * @see user_login_default_validators()
+ * @see user_login_submit()
  * @ingroup forms
  */
 function user_login($form, &$form_state) {
@@ -2068,29 +2085,35 @@ function user_login($form, &$form_state) {
 }
 
 /**
- * Set up a series for validators which check for blocked users,
- * then authenticate against local database, then return an error if
- * authentication fails. Distributed authentication modules are welcome
- * to use hook_form_alter() to change this series in order to
- * authenticate against their user database instead of the local users
- * table. If a distributed authentication module is successful, it
- * should set $form_state['uid'] to a user ID.
+ * Returns a list of validation functions for user_login().
+ *
+ * These validators first check for blocked users; then authenticate against
+ * records in the local database; and finally, return an error if
+ * authentication fails.
  *
- * We use three validators instead of one since external authentication
- * modules usually only need to alter the second validator.
+ * Distributed authentication modules are welcome to use hook_form_alter() to
+ * change this series in order to authenticate against their user database
+ * instead of the local users table. If a distributed authentication module is
+ * successful, it should set $form_state['uid'] to a user ID.
+ *
+ * We use three validators instead of one since external authentication modules
+ * usually only need to alter the second validator.
+ *
+ * @return array
+ *   A simple list of validate functions.
  *
  * @see user_login_name_validate()
  * @see user_login_authenticate_validate()
  * @see user_login_final_validate()
- * @return array
- *   A simple list of validate functions.
  */
 function user_login_default_validators() {
   return array('user_login_name_validate', 'user_login_authenticate_validate', 'user_login_final_validate');
 }
 
 /**
- * A FAPI validate handler. Sets an error if supplied username has been blocked.
+ * Form validation handler for user_login().
+ *
+ * Sets an error if supplied username has been blocked.
  */
 function user_login_name_validate($form, &$form_state) {
   if (isset($form_state['values']['name']) && user_is_blocked($form_state['values']['name'])) {
@@ -2100,9 +2123,10 @@ function user_login_name_validate($form, &$form_state) {
 }
 
 /**
- * A validate handler on the login form. Check supplied username/password
- * against local users table. If successful, $form_state['uid']
- * is set to the matching user ID.
+ * Form validation handler for user_login().
+ *
+ * Check supplied username/password against local users table. If successful,
+ * $form_state['uid'] is set to the matching user ID.
  */
 function user_login_authenticate_validate($form, &$form_state) {
   $password = trim($form_state['values']['pass']);
@@ -2145,11 +2169,10 @@ function user_login_authenticate_validate($form, &$form_state) {
 }
 
 /**
- * The final validation handler on the login form.
+ * Form validation handler for user_login().
  *
- * Sets a form error if user has not been authenticated, or if too many
- * logins have been attempted. This validation function should always
- * be the last one.
+ * Sets a form error if user has not been authenticated, or if too many logins
+ * have been attempted. This validation function should always be the last one.
  */
 function user_login_final_validate($form, &$form_state) {
   if (empty($form_state['uid'])) {
@@ -2182,12 +2205,13 @@ function user_login_final_validate($form, &$form_state) {
 }
 
 /**
- * Try to validate the user's login credentials locally.
+ * Tries to validate a user's login credentials locally.
  *
  * @param $name
  *   User name to authenticate.
  * @param $password
  *   A plain-text password, such as trimmed text from form values.
+ *
  * @return
  *   The user's uid on success, or FALSE on failure to authenticate.
  */
@@ -2213,10 +2237,11 @@ function user_authenticate($name, $password) {
 }
 
 /**
- * Finalize the login process. Must be called when logging in a user.
+ * Finalizes the login process.
  *
- * The function records a watchdog message about the new session, saves the
- * login timestamp, calls hook_user op 'login' and generates a new session. *
+ * Must be called when logging in a user. Records a watchdog message about the
+ * new session, saves the login timestamp, calls hook_user op 'login' and
+ * generates a new session.
  */
 function user_login_finalize(&$edit = array()) {
   global $user;
@@ -2238,9 +2263,11 @@ function user_login_finalize(&$edit = array()) {
 }
 
 /**
- * Submit handler for the login form. Load $user object and perform standard login
- * tasks. The user is then redirected to the My Account page. Setting the
- * destination in the query string overrides the redirect.
+ * Form submission handler for user_login().
+ *
+ * Load $user object and perform standard login tasks. The user is then
+ * redirected to the My Account page. Setting the destination in the query
+ * string overrides the redirect.
  */
 function user_login_submit($form, &$form_state) {
   global $user;
@@ -2251,8 +2278,10 @@ function user_login_submit($form, &$form_state) {
 }
 
 /**
- * Helper function for authentication modules. Either logs in or registers
- * the current user, based on username. Either way, the global $user object is
+ * Saves user details locally for users authenticated by external mechanisms.
+ *
+ * Helper function for authentication modules. Either logs in or registers the
+ * current user, based on username. Either way, the global $user object is
  * populated and login tasks are performed.
  */
 function user_external_login_register($name, $module) {
@@ -2343,7 +2372,7 @@ function user_pass_rehash($password, $timestamp, $login) {
 }
 
 /**
- * Cancel a user account.
+ * Cancels a user account.
  *
  * Since the user cancellation process needs to be run in a batch, either
  * Form API will invoke it, or batch_process() needs to be invoked after calling
@@ -2444,7 +2473,7 @@ function _user_cancel($edit, $account, $method) {
 }
 
 /**
- * Delete a user.
+ * Deletes a user.
  *
  * @param $uid
  *   A user ID.
@@ -2454,7 +2483,7 @@ function user_delete($uid) {
 }
 
 /**
- * Delete multiple user accounts.
+ * Deletes multiple user accounts.
  *
  * @param $uids
  *   An array of user IDs.
@@ -2510,7 +2539,7 @@ function user_view_page($account) {
 }
 
 /**
- * Generate an array for rendering the given user.
+ * Generates an array for rendering the given user.
  *
  * When viewing a user profile, the $page array contains:
  *
@@ -2793,7 +2822,7 @@ function user_mail_tokens(&$replacements, $data, $options) {
 /*** Administrative features ***********************************************/
 
 /**
- * Retrieve an array of roles matching specified conditions.
+ * Retrieves an array of roles matching specified conditions.
  *
  * @param $membersonly
  *   Set this to TRUE to exclude the 'anonymous' role.
@@ -2894,16 +2923,16 @@ function user_role_load_by_name($role_name) {
 }
 
 /**
- * Save a user role to the database.
+ * Saves a user role to the database.
  *
  * @param $role
- *   A role object to modify or add. If $role->rid is not specified, a new
- *   role will be created.
+ *   A role object to modify or add. If $role->rid is not specified, a new role
+ *   will be created.
+ *
  * @return
- *   Status constant indicating if role was created or updated.
- *   Failure to write the user role record will return FALSE. Otherwise.
- *   SAVED_NEW or SAVED_UPDATED is returned depending on the operation
- *   performed.
+ *   Status constant indicating if role was created or updated. Failure to write
+ *   the user role record will return FALSE. Otherwise, SAVED_NEW or
+ *   SAVED_UPDATED is returned depending on the operation performed.
  */
 function user_role_save($role) {
   if ($role->name) {
@@ -2937,7 +2966,7 @@ function user_role_save($role) {
 }
 
 /**
- * Delete a user role from database.
+ * Deletes a user role from database.
  *
  * @param $role
  *   A string with the role name, or an integer with the role ID.
@@ -2981,7 +3010,7 @@ function user_role_edit_access($role) {
 }
 
 /**
- * Determine the modules that permissions belong to.
+ * Determines the modules that permissions belong to.
  *
  * @return
  *   An associative array in the format $permission => $module.
@@ -2998,7 +3027,7 @@ function user_permission_get_modules() {
 }
 
 /**
- * Change permissions for a user role.
+ * Changes permissions for a user role.
  *
  * This function may be used to grant and revoke multiple permissions at once.
  * For example, when a form exposes checkboxes to configure permissions for a
@@ -3040,7 +3069,7 @@ function user_role_change_permissions($rid, array $permissions = array()) {
 }
 
 /**
- * Grant permissions to a user role.
+ * Grants permissions to a user role.
  *
  * @param $rid
  *   The ID of a user role to alter.
@@ -3071,7 +3100,7 @@ function user_role_grant_permissions($rid, array $permissions = array()) {
 }
 
 /**
- * Revoke permissions from a user role.
+ * Revokes permissions from a user role.
  *
  * @param $rid
  *   The ID of a user role to alter.
@@ -3229,6 +3258,9 @@ function user_multiple_role_edit($accounts, $operation, $rid) {
   }
 }
 
+/**
+ * Form constructor for the cancel multiple user accounts form.
+ */
 function user_multiple_cancel_confirm($form, &$form_state) {
   $edit = $form_state['input'];
 
@@ -3294,9 +3326,8 @@ function user_multiple_cancel_confirm($form, &$form_state) {
 }
 
 /**
- * Submit handler for mass-account cancellation form.
+ * Submit handler for user_multiple_cancel_confirm().
  *
- * @see user_multiple_cancel_confirm()
  * @see user_cancel_confirm_form_submit()
  */
 function user_multiple_cancel_confirm_submit($form, &$form_state) {
@@ -3324,7 +3355,7 @@ function user_multiple_cancel_confirm_submit($form, &$form_state) {
 }
 
 /**
- * List user administration filters that can be applied.
+ * Lists user administration filters that can be applied.
  */
 function user_filters() {
   // Regular filters
@@ -3446,17 +3477,19 @@ function theme_user_signature($variables) {
 }
 
 /**
- * Get the language object preferred by the user. This user preference can
- * be set on the user account editing page, and is only available if there
- * are more than one languages enabled on the site. If the user did not
- * choose a preferred language, or is the anonymous user, the $default
- * value, or if it is not set, the site default language will be returned.
+ * Gets the language object preferred by the user.
+ *
+ * This user preference can be set on the user account editing page, and is only
+ * available if there are more than one languages enabled on the site. If the
+ * user did not choose a preferred language, or is the anonymous user, the
+ * $default value, or if it is not set, the site default language will be
+ * returned.
  *
  * @param $account
  *   User account to look up language for.
  * @param $default
- *   Optional default language object to return if the account
- *   has no valid language.
+ *   Optional default language object to return if the account has no valid
+ *   language.
  */
 function user_preferred_language($account, $default = NULL) {
   $language_list = language_list();
@@ -3469,11 +3502,7 @@ function user_preferred_language($account, $default = NULL) {
 }
 
 /**
- * Conditionally create and send a notification email when a certain
- * operation happens on the given user account.
- *
- * @see user_mail_tokens()
- * @see drupal_mail()
+ * Sends notification emails to users.
  *
  * @param $op
  *   The operation being performed on the account. Possible values:
@@ -3487,16 +3516,18 @@ function user_preferred_language($account, $default = NULL) {
  *   - 'status_blocked': Account blocked.
  *   - 'cancel_confirm': Account cancellation request.
  *   - 'status_canceled': Account canceled.
- *
  * @param $account
  *   The user object of the account being notified. Must contain at
  *   least the fields 'uid', 'name', and 'mail'.
  * @param $language
- *   Optional language to use for the notification, overriding account language.
+ *  Optional language to use for the notification, overriding account language.
  *
  * @return
- *   The return value from drupal_mail_system()->mail(), if ends up being
- *   called.
+ *  The return value from drupal_mail_system()->mail(), if it ends up being
+ *  called.
+ *
+ * @see user_mail_tokens()
+ * @see drupal_mail()
  */
 function _user_mail_notify($op, $account, $language = NULL) {
   // By default, we always notify except for canceled and blocked.
@@ -3639,7 +3670,7 @@ function user_block_user_action(&$entity, $context = array()) {
 /**
  * Implements hook_form_FORM_ID_alter().
  *
- * Add a checkbox for the 'user_register_form' instance settings on the 'Edit
+ * Adds a checkbox for the 'user_register_form' instance settings on the 'Edit
  * field instance' form.
  */
 function user_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id) {
@@ -3675,7 +3706,9 @@ function user_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id
 /**
  * Additional submit handler for the 'Edit field instance' form.
  *
- * Make sure the 'user_register_form' setting is set for required fields.
+ * Makes sure the 'user_register_form' setting is set for required fields.
+ *
+ * @see user_form_field_ui_field_edit_form_alter()
  */
 function user_form_field_ui_field_edit_form_submit($form, &$form_state) {
   $instance = $form_state['values']['instance'];
@@ -3686,12 +3719,12 @@ function user_form_field_ui_field_edit_form_submit($form, &$form_state) {
 }
 
 /**
- * Form builder; the user registration form.
+ * Form constructor for the user registration form.
  *
- * @ingroup forms
  * @see user_account_form()
  * @see user_account_form_validate()
  * @see user_register_submit()
+ * @ingroup forms
  */
 function user_register_form($form, &$form_state) {
   global $user;
@@ -3740,19 +3773,21 @@ function user_register_form($form, &$form_state) {
 }
 
 /**
- * Validation function for the user registration form.
+ * Form validation handler for user_register_form().
+ *
+ * @see user_register_submit()
  */
 function user_register_validate($form, &$form_state) {
   entity_form_field_validate('user', $form, $form_state);
 }
 
 /**
- * Submit handler for the user registration form.
+ * Form submission handler for user_register_form().
  *
- * This function is shared by the installation form and the normal registration form,
- * which is why it can't be in the user.pages.inc file.
+ * This function is shared by the installation form and the normal registration
+ * form, which is why it can't be in the user.pages.inc file.
  *
- * @see user_register_form()
+ * @see user_register_validate()
  */
 function user_register_submit($form, &$form_state) {
   $admin = user_access('administer users');
@@ -3856,7 +3891,7 @@ function user_modules_uninstalled($modules) {
 }
 
 /**
- * Helper function to rewrite the destination to avoid redirecting to login page after login.
+ * Ensures that users are not redirected to the login page after logging in.
  *
  * Third-party authentication modules may use this function to determine the
  * proper destination after a user has been properly logged in.
@@ -3883,7 +3918,7 @@ function user_cookie_save(array $values) {
 }
 
 /**
- * Delete a visitor information cookie.
+ * Deletes a visitor information cookie.
  *
  * @param $cookie_name
  *   A cookie name such as 'homepage'.
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 8239c53..3e80cf6 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -6,7 +6,8 @@
  */
 
 /**
- * Menu callback; Retrieve a JSON object containing autocomplete suggestions for existing users.
+ * Menu callback; Retrieves a JSON object containing autocomplete suggestions
+ * for existing users.
  */
 function user_autocomplete($string = '') {
   $matches = array();
@@ -21,11 +22,11 @@ function user_autocomplete($string = '') {
 }
 
 /**
- * Form builder; Request a password reset.
+ * Form constructor for the request password reset form.
  *
- * @ingroup forms
  * @see user_pass_validate()
  * @see user_pass_submit()
+ * @ingroup forms
  */
 function user_pass() {
   global $user;
@@ -53,6 +54,11 @@ function user_pass() {
   return $form;
 }
 
+/**
+ * Form validation handler for user_pass().
+ *
+ * @see user_pass_submit()
+ */
 function user_pass_validate($form, &$form_state) {
   $name = trim($form_state['values']['name']);
   // Try to load by email.
@@ -71,6 +77,11 @@ function user_pass_validate($form, &$form_state) {
   }
 }
 
+/**
+ * Form submission handler for user_pass().
+ *
+ * @see user_pass_validate()
+ */
 function user_pass_submit($form, &$form_state) {
   global $language;
 
@@ -87,7 +98,7 @@ function user_pass_submit($form, &$form_state) {
 }
 
 /**
- * Menu callback; process one time login link and redirects to the user page on success.
+ * Processes one time login link and redirect to user edit page on success.
  */
 function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $action = NULL) {
   global $user;
@@ -155,7 +166,8 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a
     }
     else {
       // Deny access, no more clues.
-      // Everything will be in the watchdog's URL for the administrator to check.
+      // Everything will be in the watchdog's URL for the administrator to
+      // check.
       drupal_access_denied();
     }
   }
@@ -198,14 +210,14 @@ function template_preprocess_user_profile(&$variables) {
 }
 
 /**
- * Form builder; edit a user account.
+ * Form constructor for the user edit form.
  *
- * @ingroup forms
  * @see user_account_form()
  * @see user_account_form_validate()
  * @see user_profile_form_validate()
  * @see user_profile_form_submit()
  * @see user_cancel_confirm_form_submit()
+ * @ingroup forms
  */
 function user_profile_form($form, &$form_state, $account) {
   global $user;
@@ -249,14 +261,18 @@ function user_profile_form($form, &$form_state, $account) {
 }
 
 /**
- * Validation function for the user account and profile editing form.
+ * Form validation handler for user_profile_form().
+ *
+ * @see user_profile_form_submit().
  */
 function user_profile_form_validate($form, &$form_state) {
   entity_form_field_validate('user', $form, $form_state);
 }
 
 /**
- * Submit function for the user account and profile editing form.
+ * Form submission handler for user_profile_form().
+ *
+ * @see user_profile_form_validate().
  */
 function user_profile_form_submit($form, &$form_state) {
   $account = $form_state['user'];
@@ -289,7 +305,10 @@ function user_profile_form_submit($form, &$form_state) {
 }
 
 /**
- * Submit function for the 'Cancel account' button on the user edit form.
+ * Form submission handler for user_profile_form().
+ *
+ * Called when the 'Cancel account' button is clicked. Redirects the user to a
+ * confirm dialogue.
  */
 function user_edit_cancel_submit($form, &$form_state) {
   $destination = array();
@@ -302,10 +321,10 @@ function user_edit_cancel_submit($form, &$form_state) {
 }
 
 /**
- * Form builder; confirm form for cancelling user account.
+ * Form constructor for the user cancellation confirm form.
  *
- * @ingroup forms
  * @see user_edit_cancel_submit()
+ * @ingroup forms
  */
 function user_cancel_confirm_form($form, &$form_state, $account) {
   global $user;
@@ -379,9 +398,8 @@ function user_cancel_confirm_form($form, &$form_state, $account) {
 }
 
 /**
- * Submit handler for the account cancellation confirm form.
+ * Form submission handler for user_cancel_confirm_form().
  *
- * @see user_cancel_confirm_form()
  * @see user_multiple_cancel_confirm_submit()
  */
 function user_cancel_confirm_form_submit($form, &$form_state) {
@@ -413,7 +431,7 @@ function user_cancel_confirm_form_submit($form, &$form_state) {
 }
 
 /**
- * Helper function to return available account cancellation methods.
+ * Returns a list of available account cancellation methods.
  *
  * See documentation of hook_user_cancel_methods_alter().
  *
@@ -464,7 +482,7 @@ function user_cancel_methods() {
 }
 
 /**
- * Menu callback; Cancel a user account via e-mail confirmation link.
+ * Menu callback; cancel a user account via e-mail confirmation link.
  *
  * @see user_cancel_confirm_form()
  * @see user_cancel_url()
diff --git a/core/modules/user/user.test b/core/modules/user/user.test
index 367bf82..0df38ca 100644
--- a/core/modules/user/user.test
+++ b/core/modules/user/user.test
@@ -895,7 +895,8 @@ class UserPictureTestCase extends DrupalWebTestCase {
    *  GD Toolkit is installed
    *  Picture has invalid dimension
    *
-   * results: The image should be uploaded because ImageGDToolkit resizes the picture
+   * results: The image should be uploaded because ImageGDToolkit resizes the
+   * picture.
    */
   function testWithGDinvalidDimension() {
     if ($this->_directory_test && image_get_toolkit()) {
@@ -928,7 +929,8 @@ class UserPictureTestCase extends DrupalWebTestCase {
    *  GD Toolkit is installed
    *  Picture has invalid size
    *
-   * results: The image should be uploaded because ImageGDToolkit resizes the picture
+   * results: The image should be uploaded because ImageGDToolkit resizes the
+   * picture.
    */
   function testWithGDinvalidSize() {
     if ($this->_directory_test && image_get_toolkit()) {
@@ -964,7 +966,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
    *  GD Toolkit is not installed
    *  Picture has invalid size
    *
-   * results: The image shouldn't be uploaded
+   * results: The image shouldn't be uploaded.
    */
   function testWithoutGDinvalidDimension() {
     if ($this->_directory_test && !image_get_toolkit()) {
@@ -996,7 +998,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
    *  GD Toolkit is not installed
    *  Picture has invalid size
    *
-   * results: The image shouldn't be uploaded
+   * results: The image shouldn't be uploaded.
    */
   function testWithoutGDinvalidSize() {
     if ($this->_directory_test && !image_get_toolkit()) {
@@ -1028,7 +1030,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
    * Do the test:
    *  Picture is valid (proper size and dimension)
    *
-   * results: The image should be uploaded
+   * results: The image should be uploaded.
    */
   function testPictureIsValid() {
     if ($this->_directory_test) {
@@ -1284,7 +1286,8 @@ class UserTimeZoneFunctionalTest extends DrupalWebTestCase {
   }
 
   /**
-   * Tests the display of dates and time when user-configurable time zones are set.
+   * Tests the display of dates and time when user-configurable time zones are
+   * set.
    */
   function testUserTimeZone() {
     // Setup date/time settings for Los Angeles time.
