diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 32f47fa..0b10b37 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2848,7 +2848,7 @@ function drupal_classloader_register($name, $path) {
  *
  * Example:
  * @code
- * function user_access($string, $account = NULL) {
+ * function user_access($string, User $account = NULL) {
  *   // Use the advanced drupal_static() pattern, since this is called very often.
  *   static $drupal_static_fast;
  *   if (!isset($drupal_static_fast)) {
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index cb62bea..0d15e93 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -1237,7 +1237,7 @@ function comment_node_search_result(EntityInterface $node) {
 /**
  * Implements hook_user_cancel().
  */
-function comment_user_cancel($edit, $account, $method) {
+function comment_user_cancel($edit, User $account, $method) {
   switch ($method) {
     case 'user_cancel_block_unpublish':
       $comments = entity_load_multiple_by_properties('comment', array('uid' => $account->id()));
@@ -1260,8 +1260,65 @@ function comment_user_cancel($edit, $account, $method) {
 /**
  * Implements hook_user_predelete().
  */
-function comment_user_predelete($account) {
+function comment_user_predelete(User $account) {
   $cids = db_query('SELECT c.cid FROM {comment} c WHERE uid = :uid', array(':uid' => $account->id()))->fetchCol();
+  comment_delete_multiple($cids);
+}
+
+/**
+ * Determines whether the current user has access to a particular comment.
+ *
+ * Authenticated users can edit their comments as long they have not been
+ * replied to. This prevents people from changing or revising their statements
+ * based on the replies to their posts.
+ *
+ * @param $op
+ *   The operation that is to be performed on the comment. Only 'edit' is
+ *   recognized now.
+ * @param Drupal\comment\Comment $comment
+ *   The comment object.
+ *
+ * @return
+ *   TRUE if the current user has acces to the comment, FALSE otherwise.
+ */
+function comment_access($op, Comment $comment) {
+  global $user;
+
+  if ($op == 'edit') {
+    return ($user->uid && $user->uid == $comment->uid && $comment->status == COMMENT_PUBLISHED && user_access('edit own comments')) || user_access('administer comments');
+  }
+}
+
+/**
+ * Accepts a submission of new or changed comment content.
+ *
+ * @param Drupal\comment\Comment $comment
+ *   A comment object.
+ */
+function comment_save(Comment $comment) {
+  $comment->save();
+}
+
+/**
+ * Deletes a comment and all its replies.
+ *
+ * @param $cid
+ *   The ID of the comment to delete.
+ */
+function comment_delete($cid) {
+  comment_delete_multiple(array($cid));
+}
+
+/**
+ * Deletes comments and all their replies.
+ *
+ * @param $cids
+ *   The IDs of the comments to delete.
+ *
+ * @see hook_comment_predelete()
+ * @see hook_comment_delete()
+ */
+function comment_delete_multiple($cids) {
   entity_delete_multiple('comment', $cids);
 }
 
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index 4cdea75..34b516e 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -103,7 +103,7 @@ function contact_menu() {
 /**
  * Access callback: Checks access for a user's personal contact form.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The user object of the user whose contact form is being requested.
  *
  * @see contact_menu()
diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php
index a6ca7f9..485975d 100644
--- a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php
+++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\contact\Tests;
 
+use Drupal\user\User;
 use Drupal\simpletest\WebTestBase;
 
 /**
@@ -211,13 +212,13 @@ function testPersonalContactFlood() {
   /**
    * Fills out a user's personal contact form and submits it.
    *
-   * @param $account
+   * @param Drupal\user\User $account
    *   A user object of the user being contacted.
    * @param $message
    *   (optional) An array with the form fields being used. Defaults to an empty
    *   array.
    */
-  protected function submitPersonalContact($account, array $message = array()) {
+  protected function submitPersonalContact(User $account, array $message = array()) {
     $message += array(
       'subject' => $this->randomName(16),
       'message' => $this->randomName(64),
diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php
index 50b5edb..0759291 100644
--- a/core/modules/field/field.api.php
+++ b/core/modules/field/field.api.php
@@ -586,13 +586,13 @@ function hook_field_purge_instance($instance) {
  *   The type of $entity; for example, 'node' or 'user'.
  * @param $entity
  *   (optional) The entity for the operation.
- * @param $account
+ * @param Drupal\user\User $account
  *   (optional) The account to check; if not given use currently logged in user.
  *
  * @return
  *   TRUE if the operation is allowed, and FALSE if the operation is denied.
  */
-function hook_field_access($op, \Drupal\field\FieldInterface $field, $entity_type, $entity, $account) {
+function hook_field_access($op, \Drupal\field\FieldInterface $field, $entity_type, $entity, Drupal\user\User $account) {
   if ($field['field_name'] == 'field_of_interest' && $op == 'edit') {
     return $account->hasPermission('edit field of interest');
   }
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 01c9181..d12c063 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -605,13 +605,13 @@ function field_view_field(EntityInterface $entity, $field_name, $display_options
  *   The type of $entity; for example, 'node' or 'user'.
  * @param $entity
  *   (optional) The entity for the operation.
- * @param $account
+ * @param Drupal\user\User $account
  *   (optional) The account to check, if not given use currently logged in user.
  *
  * @return
  *   TRUE if the operation is allowed; FALSE if the operation is denied.
  */
-function field_access($op, FieldInterface $field, $entity_type, $entity = NULL, $account = NULL) {
+function field_access($op, FieldInterface $field, $entity_type, $entity = NULL, Drupal\user\User $account = NULL) {
   global $user;
 
   if (!isset($account)) {
diff --git a/core/modules/field/tests/modules/field_test/field_test.field.inc b/core/modules/field/tests/modules/field_test/field_test.field.inc
index 3ac75fa..75b3d01 100644
--- a/core/modules/field/tests/modules/field_test/field_test.field.inc
+++ b/core/modules/field/tests/modules/field_test/field_test.field.inc
@@ -8,6 +8,7 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\field\FieldException;
 use Drupal\field\FieldInterface;
+use Drupal\user\User;
 
 /**
  * Implements hook_field_info().
@@ -201,7 +202,7 @@ function field_test_default_value(EntityInterface $entity, $field, $instance) {
 /**
  * Implements hook_field_access().
  */
-function field_test_field_access($op, FieldInterface $field, $entity_type, $entity, $account) {
+function field_test_field_access($op, FieldInterface $field, $entity_type, $entity, User $account) {
   if ($field['field_name'] == "field_no_{$op}_access") {
     return FALSE;
   }
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index 59d27b5..ad3ef71 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -163,7 +163,7 @@
  * sure to restore your {node_access} record after node_access_rebuild() is
  * called.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The user object whose grants are requested.
  * @param $op
  *   The node operation to be performed, such as 'view', 'update', or 'delete'.
@@ -178,7 +178,7 @@
  * @see node_access_rebuild()
  * @ingroup node_access
  */
-function hook_node_grants($account, $op) {
+function hook_node_grants(Drupal\user\User $account, $op) {
   if (user_access('access private content', $account)) {
     $grants['example'] = array(1);
   }
@@ -353,7 +353,7 @@ function hook_node_access_records_alter(&$grants, Drupal\Core\Entity\EntityInter
  *
  * @param $grants
  *   The $grants array returned by hook_node_grants().
- * @param $account
+ * @param Drupal\user\User $account
  *   The user account requesting access to content.
  * @param $op
  *   The operation being performed, 'view', 'update' or 'delete'.
@@ -363,7 +363,7 @@ function hook_node_access_records_alter(&$grants, Drupal\Core\Entity\EntityInter
  * @see hook_node_access_records_alter()
  * @ingroup node_access
  */
-function hook_node_grants_alter(&$grants, $account, $op) {
+function hook_node_grants_alter(&$grants, Drupal\user\User $account, $op) {
   // Our sample module never allows certain roles to edit or delete
   // content. Since some other node access modules might allow this
   // permission, we expressly remove it by returning an empty $grants
@@ -548,7 +548,7 @@ function hook_node_load($nodes, $types) {
  *   - "delete"
  *   - "update"
  *   - "view"
- * @param object $account
+ * @param Drupal\user\User $account
  *   The user object to perform the access check operation on.
  * @param object $langcode
  *   The language code to perform the access check operation on.
@@ -560,7 +560,7 @@ function hook_node_load($nodes, $types) {
  *
  * @ingroup node_access
  */
-function hook_node_access(\Drupal\node\NodeInterface $node, $op, $account, $langcode) {
+function hook_node_access(\Drupal\node\NodeInterface $node, $op, Drupal\user\User $account, $langcode) {
   $type = is_string($node) ? $node : $node->getType();
 
   $configured_types = node_permissions_get_configured_types();
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index cf31cc4..caa6976 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -863,7 +863,7 @@ function node_user_cancel($edit, $account, $method) {
 /**
  * Implements hook_user_predelete().
  */
-function node_user_predelete($account) {
+function node_user_predelete(User $account) {
   // Delete nodes (current revisions).
   // @todo Introduce node_mass_delete() or make node_mass_update() more flexible.
   $nodes = db_select('node_field_data', 'n')
@@ -921,7 +921,7 @@ function theme_node_search_admin($variables) {
  *   The node to check.
  * @param $op
  *   (optional) The specific operation being checked. Defaults to 'view.'
- * @param object $account
+ * @param Drupal\user\User $account
  *   (optional) A user object representing the user for whom the operation is
  *   to be performed. Determines access for a user other than the current user.
  *   Defaults to NULL.
@@ -935,7 +935,7 @@ function theme_node_search_admin($variables) {
  *
  * @see node_menu()
  */
-function _node_revision_access(EntityInterface $node, $op = 'view', $account = NULL, $langcode = NULL) {
+function _node_revision_access(EntityInterface $node, $op = 'view', User $account = NULL, $langcode = NULL) {
   return \Drupal::service('access_check.node.revision')->checkAccess($node, $op, $account, $langcode);
 }
 
@@ -1635,7 +1635,7 @@ function node_access($op, $node, $account = NULL, $langcode = NULL) {
 /**
  * Implements hook_node_access().
  */
-function node_node_access($node, $op, $account) {
+function node_node_access($node, $op, User $account) {
   $type = $node->bundle();
 
   $configured_types = node_permissions_get_configured_types();
@@ -1740,7 +1740,7 @@ function node_permissions_get_configured_types() {
  *
  * @param $op
  *   The operation that the user is trying to perform.
- * @param $account
+ * @param Drupal\user\User $account
  *   (optional) The user object for the user performing the operation. If
  *   omitted, the current user is used.  Defaults to NULL.
  *
@@ -1748,7 +1748,7 @@ function node_permissions_get_configured_types() {
  *   An associative array in which the keys are realms, and the values are
  *   arrays of grants for those realms.
  */
-function node_access_grants($op, $account = NULL) {
+function node_access_grants($op, User $account = NULL) {
 
   if (!isset($account)) {
     $account = $GLOBALS['user'];
@@ -1774,7 +1774,7 @@ function node_access_grants($op, $account = NULL) {
  * 'node_access'; when this function returns TRUE, no node access joins are
  * added to the query.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   (optional) The user object for the user whose access is being checked. If
  *   omitted, the current user is used. Defaults to NULL.
  *
@@ -1784,7 +1784,7 @@ function node_access_grants($op, $account = NULL) {
  * @see hook_node_grants()
  * @see node_query_node_access_alter()
  */
-function node_access_view_all_nodes($account = NULL) {
+function node_access_view_all_nodes(User $account = NULL) {
   global $user;
   if (!$account) {
     $account = $user;
diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.module b/core/modules/node/tests/modules/node_access_test/node_access_test.module
index 793c595..e42f026 100644
--- a/core/modules/node/tests/modules/node_access_test/node_access_test.module
+++ b/core/modules/node/tests/modules/node_access_test/node_access_test.module
@@ -15,7 +15,7 @@
 /**
  * Implements hook_node_grants().
  */
-function node_access_test_node_grants($account, $op) {
+function node_access_test_node_grants(User $account, $op) {
   $grants = array();
   // First grant a grant to the author for own content.
   $grants['node_access_test_author'] = array($account->id());
diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module
index 450f703..b0fd8d7 100644
--- a/core/modules/node/tests/modules/node_test/node_test.module
+++ b/core/modules/node/tests/modules/node_test/node_test.module
@@ -58,7 +58,7 @@ function node_test_node_view(EntityInterface $node, EntityDisplay $display, $vie
 /**
  * Implements hook_node_grants().
  */
-function node_test_node_grants($account, $op) {
+function node_test_node_grants(User $account, $op) {
   // Give everyone full grants so we don't break other node tests.
   // Our node access tests asserts three realms of access.
   // See testGrantAlter().
@@ -121,7 +121,7 @@ function node_test_node_access_records_alter(&$grants, NodeInterface $node) {
 /**
  * Implements hook_node_grants_alter().
  */
-function node_test_node_grants_alter(&$grants, $account, $op) {
+function node_test_node_grants_alter(&$grants, User $account, $op) {
   // Return an empty array of grants to prove that we can alter by reference.
   $grants = array();
 }
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/CommentAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/CommentAttributesTest.php
index 44e147c..92169fa 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/CommentAttributesTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/CommentAttributesTest.php
@@ -226,7 +226,7 @@ public function testCommentReplyOfRdfaMarkup() {
    *
    * @param $comment
    *   Comment object.
-   * @param $account
+   * @param Drupal\user\User $account
    *   An array containing information about an anonymous user.
    */
   function _testBasicCommentRdfaMarkup($graph, $comment, $account = array()) {
diff --git a/core/modules/shortcut/shortcut.admin.inc b/core/modules/shortcut/shortcut.admin.inc
index 2d6b49d..77b64ac 100644
--- a/core/modules/shortcut/shortcut.admin.inc
+++ b/core/modules/shortcut/shortcut.admin.inc
@@ -6,6 +6,7 @@
  */
 
 use Symfony\Component\HttpFoundation\RedirectResponse;
+use Drupal\user\User;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
 
 /**
@@ -15,7 +16,7 @@
  *   An associative array containing the structure of the form.
  * @param $form_state
  *   An associative array containing the current state of the form.
- * @param $account
+ * @param Drupal\user\User $account
  *   (optional) The user account whose shortcuts will be switched. Defaults to
  *   the current logged-in user.
  *
@@ -28,7 +29,7 @@
  *
  * @deprecated Use \Drupal\shortcut\Form\ShortcutForm::overview()
  */
-function shortcut_set_switch($form, &$form_state, $account = NULL) {
+function shortcut_set_switch($form, &$form_state, User $account = NULL) {
   $user = \Drupal::currentUser();
 
   if (!isset($account)) {
diff --git a/core/modules/shortcut/shortcut.api.php b/core/modules/shortcut/shortcut.api.php
index fa93e96..97a53ce 100644
--- a/core/modules/shortcut/shortcut.api.php
+++ b/core/modules/shortcut/shortcut.api.php
@@ -24,13 +24,13 @@
  * modules implement this hook, the last (i.e., highest weighted) module which
  * returns a valid shortcut set name will prevail.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The user account whose default shortcut set is being requested.
  * @return
  *   The name of the shortcut set that this module recommends for that user, if
  *   there is one.
  */
-function hook_shortcut_default_set($account) {
+function hook_shortcut_default_set(Drupal\user\User $account) {
   // Use a special set of default shortcuts for administrators only.
   if (in_array(\Drupal::config('user.settings')->get('admin_role'), $account->getRoles())) {
     return 'admin-shortcuts';
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index 8ca0472..6d62723 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -170,7 +170,7 @@ function shortcut_set_edit_access($shortcut_set = NULL) {
 /**
  * Access callback for switching the shortcut set assigned to a user account.
  *
- * @param object $account
+ * @param Drupal\user\User $account
  *   (optional) The user account whose shortcuts will be switched. If not set,
  *   permissions will be checked for switching the logged-in user's own
  *   shortcut set.
@@ -179,7 +179,7 @@ function shortcut_set_edit_access($shortcut_set = NULL) {
  *   TRUE if the current user has access to switch the shortcut set of the
  *   provided account, FALSE otherwise.
  */
-function shortcut_set_switch_access($account = NULL) {
+function shortcut_set_switch_access(Drupal\user\User $account = NULL) {
   $user = \Drupal::currentUser();
 
   if ($user->hasPermission('administer shortcuts')) {
@@ -266,10 +266,10 @@ function shortcut_set_reset_link_weights(&$shortcut_set) {
  *
  * @param $shortcut_set Drupal\shortcut\Entity\Shortcut
  *   An object representing the shortcut set.
- * @param $account
+ * @param Drupal\user\User $account
  *   A user account that will be assigned to use the set.
  */
-function shortcut_set_assign_user($shortcut_set, $account) {
+function shortcut_set_assign_user($shortcut_set, Drupal\user\User $account) {
   \Drupal::entityManager()
     ->getStorageController('shortcut_set')
     ->assignUser($shortcut_set, $account);
@@ -280,7 +280,7 @@ function shortcut_set_assign_user($shortcut_set, $account) {
  *
  * The user will go back to using whatever default set applies.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   A user account that will be removed from the shortcut set assignment.
  *
  * @return
@@ -288,7 +288,7 @@ function shortcut_set_assign_user($shortcut_set, $account) {
  *   successfully removed from it. FALSE if the user was already not assigned
  *   to any set.
  */
-function shortcut_set_unassign_user($account) {
+function shortcut_set_unassign_user(Drupal\user\User $account) {
   return (bool) \Drupal::entityManager()
     ->getStorageController('shortcut_set')
     ->unassignUser($account);
@@ -297,7 +297,7 @@ function shortcut_set_unassign_user($account) {
 /**
  * Returns the current displayed shortcut set for the provided user account.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   (optional) The user account whose shortcuts will be returned. Defaults to
  *   the currently logged-in user.
  *
@@ -306,7 +306,7 @@ function shortcut_set_unassign_user($account) {
  *   current user. If the user does not have an explicit shortcut set defined,
  *   the default set is returned.
  */
-function shortcut_current_displayed_set($account = NULL) {
+function shortcut_current_displayed_set(Drupal\user\User $account = NULL) {
   $shortcut_sets = &drupal_static(__FUNCTION__, array());
   global $user;
   if (!isset($account)) {
@@ -336,7 +336,7 @@ function shortcut_current_displayed_set($account = NULL) {
 /**
  * Returns the default shortcut set for a given user account.
  *
- * @param object $account
+ * @param Drupal\user\User $account
  *   (optional) The user account whose default shortcut set will be returned.
  *   If not provided, the function will return the currently logged-in user's
  *   default shortcut set.
@@ -344,7 +344,7 @@ function shortcut_current_displayed_set($account = NULL) {
  * @return
  *   An object representing the default shortcut set.
  */
-function shortcut_default_set($account = NULL) {
+function shortcut_default_set(User $account = NULL) {
   global $user;
   if (!isset($account)) {
     $account = $user;
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php
index e8abd34..cafa168 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php
@@ -24,7 +24,7 @@ class StatisticsAdminTest extends WebTestBase {
   /**
    * A user that has permission to administer statistics.
    *
-   * @var object|FALSE
+   * @var \Drupal\user\User|false
    *
    * A fully loaded user object, or FALSE if user creation failed.
    */
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index fb96b52..511b0f7 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -8,6 +8,7 @@
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Language\Language;
+use Drupal\user\User;
 use Drupal\Core\Utility\ModuleInfo;
 use Drupal\user\UserInterface;
 use Symfony\Component\HttpFoundation\JsonResponse;
@@ -2225,7 +2226,7 @@ function system_user_presave(UserInterface $account) {
 /**
  * Implements hook_user_login().
  */
-function system_user_login($account) {
+function system_user_login(User $account) {
   $config = \Drupal::config('system.date');
   // If the user has a NULL time zone, notify them to set a time zone.
   if (!$account->getTimezone() && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) {
diff --git a/core/modules/system/tests/modules/session_test/session_test.module b/core/modules/system/tests/modules/session_test/session_test.module
index c618bab..2be7b70 100644
--- a/core/modules/system/tests/modules/session_test/session_test.module
+++ b/core/modules/system/tests/modules/session_test/session_test.module
@@ -1,5 +1,7 @@
 <?php
 
+use Drupal\user\User;
+
 /**
  * Implements hook_user_login().
  */
diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module
index b17b11f..f259b5a 100644
--- a/core/modules/tracker/tracker.module
+++ b/core/modules/tracker/tracker.module
@@ -162,8 +162,8 @@ function tracker_cron() {
 /**
  * Access callback: Determines access permission for a user's own account.
  *
- * @param int $account
- *   The account ID to check.
+ * @param Drupal\user\User $account
+ *   The user object to check.
  *
  * @return boolean
  *   TRUE if a user is accessing tracking info for their own account and
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index 8e187ef..a172869 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -12,12 +12,15 @@
  * Queries the database for info, adds RDFa info if applicable, and generates
  * the render array that will be used to render the page.
  *
+ * @param Drupal\user\User $account
+ *   The account object for the user whose name is to be formatted.
+ *
  * @return array
  *   A renderable array.
  *
  * @see tracker_menu()
  */
-function tracker_page($account = NULL, $set_title = FALSE) {
+function tracker_page(User $account = NULL, $set_title = FALSE) {
   if ($account) {
     $query = db_select('tracker_user', 't')
       ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
index 5b2e015..fad5031 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\user\Tests;
 
+use Drupal\user\User;
 use Drupal\simpletest\WebTestBase;
 use Drupal\Core\Password\PhpassHashedPassword;
 
@@ -134,13 +135,13 @@ function testPasswordRehashOnLogin() {
   /**
    * Make an unsuccessful login attempt.
    *
-   * @param $account
-   *   A user object with name and pass_raw attributes for the login attempt.
+   * @param Drupal\user\User $account
+   *   A user entity with name and pass_raw attributes for the login attempt.
    * @param $flood_trigger
    *   Whether or not to expect that the flood control mechanism will be
    *   triggered.
    */
-  function assertFailedLogin($account, $flood_trigger = NULL) {
+  function assertFailedLogin(User $account, $flood_trigger = NULL) {
     $edit = array(
       'name' => $account->getUsername(),
       'pass' => $account->pass_raw,
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php
index b9cd7f8..79399d7 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php
@@ -83,7 +83,7 @@ function testCreateUserWithRole() {
   /**
    * Check role on user object.
    *
-   * @param object $account
+   * @param \Drupal\user\User $account
    *   The user account to check.
    * @param string $rid
    *   The role ID to search for.
@@ -91,7 +91,7 @@ function testCreateUserWithRole() {
    *   (optional) Whether to assert that $rid exists (TRUE) or not (FALSE).
    *   Defaults to TRUE.
    */
-  private function userLoadAndCheckRoleAssigned($account, $rid, $is_assigned = TRUE) {
+  private function userLoadAndCheckRoleAssigned(Drupal\user\User $account, $rid, $is_assigned = TRUE) {
     $account = user_load($account->id(), TRUE);
     if ($is_assigned) {
       $this->assertTrue(array_search($rid, $account->getRoles()), 'The role is present in the user object.');
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 5c66c0a..e03be0f 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -56,13 +56,13 @@ function hook_user_load($users) {
  * Modules should additionally implement hook_user_cancel() to process stored
  * user data for other account cancellation methods.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The account that is about to be deleted.
  *
  * @see hook_user_delete()
  * @see user_delete_multiple()
  */
-function hook_user_predelete($account) {
+function hook_user_predelete(Drupal\user\User $account) {
   db_delete('mytable')
     ->condition('uid', $account->id())
     ->execute();
@@ -77,13 +77,13 @@ function hook_user_predelete($account) {
  * Modules should additionally implement hook_user_cancel() to process stored
  * user data for other account cancellation methods.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The account that has been deleted.
  *
  * @see hook_user_predelete()
  * @see user_delete_multiple()
  */
-function hook_user_delete($account) {
+function hook_user_delete(Drupal\user\User $account) {
   drupal_set_message(t('User: @name has been deleted.', array('@name' => $account->getUsername())));
 }
 
@@ -105,7 +105,7 @@ function hook_user_delete($account) {
  *
  * @param $edit
  *   The array of form values submitted by the user.
- * @param $account
+ * @param Drupal\user\User $account
  *   The user object on which the operation is being performed.
  * @param $method
  *   The account cancellation method.
@@ -113,7 +113,7 @@ function hook_user_delete($account) {
  * @see user_cancel_methods()
  * @see hook_user_cancel_methods_alter()
  */
-function hook_user_cancel($edit, $account, $method) {
+function hook_user_cancel($edit, Drupal\user\User $account, $method) {
   switch ($method) {
     case 'user_cancel_block_unpublish':
       // Unpublish nodes (current revisions).
@@ -192,12 +192,12 @@ function hook_user_cancel_methods_alter(&$methods) {
  * @param $name
  *   The string that user_format_name() will return.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The account object passed to user_format_name().
  *
  * @see user_format_name()
  */
-function hook_user_format_name_alter(&$name, $account) {
+function hook_user_format_name_alter(&$name, Drupal\user\User $account) {
   // Display the user's uid instead of name.
   if ($account->id()) {
     $name = t('User !uid', array('!uid' => $account->id()));
@@ -215,7 +215,7 @@ function hook_user_format_name_alter(&$name, $account) {
  * @see hook_user_insert()
  * @see hook_user_update()
  */
-function hook_user_presave($account) {
+function hook_user_presave(Drupal\user\User $account) {
   // Ensure that our value is an array.
   if (isset($account->mymodule_foo)) {
     $account->mymodule_foo = (array) $account->mymodule_foo;
@@ -240,7 +240,7 @@ function hook_user_presave($account) {
  * @see hook_user_presave()
  * @see hook_user_update()
  */
-function hook_user_insert($account) {
+function hook_user_insert(Drupal\user\User $account) {
   db_insert('user_changes')
     ->fields(array(
       'uid' => $account->id(),
@@ -267,7 +267,7 @@ function hook_user_insert($account) {
  * @see hook_user_presave()
  * @see hook_user_insert()
  */
-function hook_user_update($account) {
+function hook_user_update(Drupal\user\User $account) {
   db_insert('user_changes')
     ->fields(array(
       'uid' => $account->id(),
@@ -293,10 +293,10 @@ function hook_user_login($account) {
 /**
  * The user just logged out.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The user object on which the operation was just performed.
  */
-function hook_user_logout($account) {
+function hook_user_logout(Drupal\user\User $account) {
   db_insert('logouts')
     ->fields(array(
       'uid' => $account->id(),
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 24aee74..d7f9798 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -290,8 +290,6 @@ function user_load_multiple(array $uids = NULL, $reset = FALSE) {
  * @return object
  *   A fully-loaded user object upon successful user load, or NULL if the user
  *   cannot be loaded.
- *
- * @see user_load_multiple()
  */
 function user_load($uid, $reset = FALSE) {
   return entity_load('user', $uid, $reset);
@@ -302,7 +300,7 @@ function user_load($uid, $reset = FALSE) {
  *
  * @param string $mail
  *   String with the account's e-mail address.
- * @return object|bool
+ * @return Drupal\user\User|false
  *   A fully-loaded $user object upon successful user load or FALSE if user
  *   cannot be loaded.
  *
@@ -318,7 +316,7 @@ function user_load_by_mail($mail) {
  *
  * @param string $name
  *   String with the account's user name.
- * @return object|bool
+ * @return Drupal\user\User|false
  *   A fully-loaded $user object upon successful user load or FALSE if user
  *   cannot be loaded.
  *
@@ -1100,7 +1098,7 @@ function user_user_logout($account) {
  *   A unique URL that provides a one-time log in for the user, from which
  *   they can change their password.
  */
-function user_pass_reset_url($account, $options = array()) {
+function user_pass_reset_url(User $account, $options = array()) {
   $timestamp = REQUEST_TIME;
   $langcode = isset($options['langcode']) ? $options['langcode'] : $account->getPreferredLangcode();
   $url_options = array('absolute' => TRUE, 'language' => language_load($langcode));
@@ -1110,7 +1108,7 @@ function user_pass_reset_url($account, $options = array()) {
 /**
  * Generates a URL to confirm an account cancellation request.
  *
- * @param object $account
+ * @param Drupal\user\User $account
  *   The user account object, which must contain at least the following
  *   properties:
  *   - uid: The user ID number.
@@ -1128,7 +1126,7 @@ function user_pass_reset_url($account, $options = array()) {
  * @see user_mail_tokens()
  * @see user_cancel_confirm()
  */
-function user_cancel_url($account, $options = array()) {
+function user_cancel_url(User $account, $options = array()) {
   $timestamp = REQUEST_TIME;
   $langcode = isset($options['langcode']) ? $options['langcode'] : $account->getPreferredLangcode();
   $url_options = array('absolute' => TRUE, 'language' => language_load($langcode));
@@ -1231,7 +1229,7 @@ function user_cancel($edit, $uid, $method) {
  *
  * @see user_cancel()
  */
-function _user_cancel($edit, $account, $method) {
+function _user_cancel($edit, User $account, $method) {
   global $user;
 
   switch ($method) {
@@ -1375,7 +1373,7 @@ function user_delete_multiple(array $uids) {
  * To theme user profiles, copy modules/user/user.tpl.php
  * to your theme directory, and edit it as instructed in that file's comments.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   A user object.
  * @param $view_mode
  *   View mode, e.g. 'full'.
@@ -1386,7 +1384,7 @@ function user_delete_multiple(array $uids) {
  * @return
  *   An array as expected by drupal_render().
  */
-function user_view($account, $view_mode = 'full', $langcode = NULL) {
+function user_view(Drupal\user\User $account, $view_mode = 'full', $langcode = NULL) {
   return entity_view($account, $view_mode, $langcode);
 }
 
@@ -1729,7 +1727,7 @@ function theme_user_signature($variables) {
  *   - 'cancel_confirm': Account cancellation request.
  *   - 'status_canceled': Account canceled.
  *
- * @param $account
+ * @param Drupal\user\User $account
  *   The user object of the account being notified. Must contain at
  *   least the fields 'uid', 'name', and 'mail'.
  * @param $langcode
@@ -1740,7 +1738,7 @@ function theme_user_signature($variables) {
  *   The return value from drupal_mail_system()->mail(), if ends up being
  *   called.
  */
-function _user_mail_notify($op, $account, $langcode = NULL) {
+function _user_mail_notify($op, Drupal\user\User $account, $langcode = NULL) {
   // By default, we always notify except for canceled and blocked.
   $notify = \Drupal::config('user.settings')->get('notify.' . $op);
   if ($notify || ($op != 'status_canceled' && $op != 'status_blocked')) {
