diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 82584ff..0c83d54 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -3,7 +3,6 @@
 use Drupal\Component\Utility\Crypt;
 use Drupal\Component\Utility\String;
 use Drupal\Component\Utility\Unicode;
-use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -11,16 +10,11 @@
 use \Drupal\Core\Entity\Display\EntityViewDisplayInterface;
 use Drupal\Core\Url;
 use Drupal\Core\Site\Settings;
-use Drupal\file\Entity\File;
 use Drupal\user\Entity\Role;
 use Drupal\user\Entity\User;
 use Drupal\user\UserInterface;
 use Drupal\user\RoleInterface;
-use Drupal\Core\Template\Attribute;
 use Drupal\Core\Field\BaseFieldDefinition;
-use Symfony\Component\HttpFoundation\RedirectResponse;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-use Drupal\menu_link\Entity\MenuLink;
 
 /**
  * @file
@@ -66,9 +60,13 @@ function user_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<dt>' . t('Setting permissions') . '</dt>';
       $output .= '<dd>' . t('After creating roles, you can set permissions for each role on the <a href="!permissions_user">Permissions page</a>. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating  a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', array('!permissions_user' => \Drupal::url('user.admin_permissions'))) . '</dd>';
       $output .= '<dt>' . t('Managing account settings') . '</dt>';
-      $output .= '<dd>' . t('The <a href="!accounts">Account settings page</a> allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization (including signatures), and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is enabled (the Administrator role).', array('!accounts'  => \Drupal::url('entity.user.admin_form'))) . '</dd>';
+      $output .= '<dd>' . t('The <a href="!accounts">Account settings page</a> allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization (including signatures), and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is enabled (the Administrator role).', array('!accounts' => \Drupal::url('entity.user.admin_form'))) . '</dd>';
       $output .= '<dt>' . t('Managing user account fields') . '</dt>';
-      $output .= '<dd>' . t('Because User accounts are an <a href="!entity_help">entity type</a>, you can extend them by adding <a href="!field_help">fields</a> through the Manage fields tab on the <a href="!accounts">Account settings page</a>. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website.', array('!entity_help' => \Drupal::url('help.page', array('name' => 'entity')),'!field_help'=>\Drupal::url('help.page', array('name' => 'field')), '!accounts' => \Drupal::url('entity.user.admin_form'))) . '</dd>';
+      $output .= '<dd>' . t('Because User accounts are an <a href="!entity_help">entity type</a>, you can extend them by adding <a href="!field_help">fields</a> through the Manage fields tab on the <a href="!accounts">Account settings page</a>. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website.', array(
+          '!entity_help' => \Drupal::url('help.page', array('name' => 'entity')),
+          '!field_help' => \Drupal::url('help.page', array('name' => 'field')),
+          '!accounts' => \Drupal::url('entity.user.admin_form')
+        )) . '</dd>';
       $output .= '</dl>';
       return $output;
 
@@ -76,7 +74,10 @@ function user_help($route_name, RouteMatchInterface $route_match) {
       return '<p>' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '</p>';
 
     case 'user.admin_permissions':
-      return '<p>' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the <a href="!role">Roles</a> page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the <a href="!settings">Account settings</a> page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('!role' => \Drupal::url('user.role_list'), '!settings' => \Drupal::url('entity.user.admin_form'))) . '</p>';
+      return '<p>' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the <a href="!role">Roles</a> page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the <a href="!settings">Account settings</a> page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array(
+        '!role' => \Drupal::url('user.role_list'),
+        '!settings' => \Drupal::url('entity.user.admin_form')
+      )) . '</p>';
 
     case 'user.role_list':
       return '<p>' . t('A role defines a group of users that have certain privileges. These privileges are defined on the <a href="!permissions">Permissions page</a>. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', array('!permissions' => \Drupal::url('user.admin_permissions'))) . '</p>';
@@ -102,7 +103,11 @@ function user_theme() {
       'file' => 'user.pages.inc',
     ),
     'username' => array(
-      'variables' => array('account' => NULL, 'attributes' => array(), 'link_options' => array()),
+      'variables' => array(
+        'account' => NULL,
+        'attributes' => array(),
+        'link_options' => array()
+      ),
     ),
   );
 }
@@ -118,7 +123,8 @@ function user_js_settings_alter(&$settings) {
   // can be reliably cached on the client side.
   $user = \Drupal::currentUser();
   $settings['user']['uid'] = $user->id();
-  $settings['user']['permissionsHash'] = \Drupal::service('user.permissions_hash')->generate($user);
+  $settings['user']['permissionsHash'] = \Drupal::service('user.permissions_hash')
+    ->generate($user);
 }
 
 /**
@@ -160,7 +166,8 @@ function user_attach_accounts(array &$build, array $entities) {
  * preprocess stage.
  */
 function user_picture_enabled() {
-  $field_definitions = \Drupal::entityManager()->getFieldDefinitions('user', 'user');
+  $field_definitions = \Drupal::entityManager()
+    ->getFieldDefinitions('user', 'user');
   return isset($field_definitions['user_picture']);
 }
 
@@ -392,7 +399,8 @@ function user_role_permissions(array $roles) {
 function _user_role_permissions_update($roles) {
   $role_permissions = array();
   foreach ($roles as $rid) {
-    $role_permissions[$rid] = \Drupal::config("user.role.$rid")->get('permissions') ?: array();
+    $role_permissions[$rid] = \Drupal::config("user.role.$rid")
+      ->get('permissions') ?: array();
   }
   return $role_permissions;
 }
@@ -420,7 +428,8 @@ function user_user_view(array &$build, UserInterface $account, EntityViewDisplay
   if ($display->getComponent('member_for')) {
     $build['member_for'] = array(
       '#type' => 'item',
-      '#markup' => '<h4 class="label">' . t('Member for') . '</h4> ' . \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $account->getCreatedTime()),
+      '#markup' => '<h4 class="label">' . t('Member for') . '</h4> ' . \Drupal::service('date.formatter')
+          ->formatInterval(REQUEST_TIME - $account->getCreatedTime()),
     );
   }
 }
@@ -438,7 +447,8 @@ function user_validate_current_pass(&$form, FormStateInterface $form_state) {
     // that prevent them from being empty if they are changed.
     $current_value = $account->hasField($key) ? $account->get($key)->value : $account->$key;
     if ((strlen(trim($form_state->getValue($key))) > 0) && ($form_state->getValue($key) != $current_value)) {
-      $current_pass_failed = $form_state->isValueEmpty('current_pass') || !\Drupal::service('password')->check($form_state->getValue('current_pass'), $account);
+      $current_pass_failed = $form_state->isValueEmpty('current_pass') || !\Drupal::service('password')
+          ->check($form_state->getValue('current_pass'), $account);
       if ($current_pass_failed) {
         $form_state->setErrorByName('current_pass', t("Your current password is missing or incorrect; it's required to change the %name.", array('%name' => $name)));
         $form_state->setErrorByName($key);
@@ -542,7 +552,8 @@ function template_preprocess_username(&$variables) {
     $variables['truncated'] = FALSE;
   }
   $variables['name'] = String::checkPlain($name);
-  $variables['profile_access'] = \Drupal::currentUser()->hasPermission('access user profiles');
+  $variables['profile_access'] = \Drupal::currentUser()
+    ->hasPermission('access user profiles');
 
   $external = FALSE;
   // Populate link path and attributes if appropriate.
@@ -602,7 +613,8 @@ function user_menu_breadcrumb_alter(&$active_trail, $item) {
 function user_login_finalize(UserInterface $account) {
   global $user;
   $user = $account;
-  \Drupal::logger('user')->notice('Session opened for %name.', array('%name' => $account->getUsername()));
+  \Drupal::logger('user')
+    ->notice('Session opened for %name.', array('%name' => $account->getUsername()));
   // Update the user table timestamp noting user has logged in.
   // This is also used to invalidate one-time login links.
   $account->setLastLoginTime(REQUEST_TIME);
@@ -694,7 +706,10 @@ function user_pass_reset_url($account, $options = array()) {
 function user_cancel_url($account, $options = array()) {
   $timestamp = REQUEST_TIME;
   $langcode = isset($options['langcode']) ? $options['langcode'] : $account->getPreferredLangcode();
-  $url_options = array('absolute' => TRUE, 'language' => \Drupal::languageManager()->getLanguage($langcode));
+  $url_options = array(
+    'absolute' => TRUE,
+    'language' => \Drupal::languageManager()->getLanguage($langcode)
+  );
   return \Drupal::url('user.cancel_confirm', [
     'user' => $account->id(),
     'timestamp' => $timestamp,
@@ -749,7 +764,8 @@ function user_cancel($edit, $uid, $method) {
 
   if (!$account) {
     drupal_set_message(t('The user account %id does not exist.', array('%id' => $uid)), 'error');
-    \Drupal::logger('user')->error('Attempted to cancel non-existing user account: %id.', array('%id' => $uid));
+    \Drupal::logger('user')
+      ->error('Attempted to cancel non-existing user account: %id.', array('%id' => $uid));
     return;
   }
 
@@ -766,7 +782,11 @@ function user_cancel($edit, $uid, $method) {
   // account deletion.
   if ($method != 'user_cancel_delete') {
     // Allow modules to add further sets to this batch.
-    \Drupal::moduleHandler()->invokeAll('user_cancel', array($edit, $account, $method));
+    \Drupal::moduleHandler()->invokeAll('user_cancel', array(
+      $edit,
+      $account,
+      $method
+    ));
   }
 
   // Finish the batch and actually cancel the account.
@@ -813,7 +833,10 @@ function _user_cancel($edit, $account, $method) {
       $account->block();
       $account->save();
       drupal_set_message(t('%name has been disabled.', array('%name' => $account->getUsername())));
-      $logger->notice('Blocked user: %name %email.', array('%name' => $account->getUsername(), '%email' => '<' . $account->getEmail() . '>'));
+      $logger->notice('Blocked user: %name %email.', array(
+        '%name' => $account->getUsername(),
+        '%email' => '<' . $account->getEmail() . '>'
+      ));
       break;
 
     case 'user_cancel_reassign':
@@ -824,7 +847,10 @@ function _user_cancel($edit, $account, $method) {
       }
       $account->delete();
       drupal_set_message(t('%name has been deleted.', array('%name' => $account->getUsername())));
-      $logger->notice('Deleted user: %name %email.', array('%name' => $account->getUsername(), '%email' => '<' . $account->getEmail() . '>'));
+      $logger->notice('Deleted user: %name %email.', array(
+        '%name' => $account->getUsername(),
+        '%email' => '<' . $account->getEmail() . '>'
+      ));
       break;
   }
 
@@ -982,14 +1008,20 @@ function user_mail($key, &$message, $params) {
   $langcode = $message['langcode'];
   $variables = array('user' => $params['account']);
 
-  $language = \Drupal::languageManager()->getLanguage($params['account']->getPreferredLangcode());
+  $language = \Drupal::languageManager()
+    ->getLanguage($params['account']->getPreferredLangcode());
   $original_language = $language_manager->getConfigOverrideLanguage();
   $language_manager->setConfigOverrideLanguage($language);
   $mail_config = \Drupal::config('user.mail');
 
-   // We do not sanitize the token replacement, since the output of this
-   // replacement is intended for an email message, not a web browser.
-  $token_options = array('langcode' => $langcode, 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE);
+  // We do not sanitize the token replacement, since the output of this
+  // replacement is intended for an email message, not a web browser.
+  $token_options = array(
+    'langcode' => $langcode,
+    'callback' => 'user_mail_tokens',
+    'sanitize' => FALSE,
+    'clear' => TRUE
+  );
   $message['subject'] .= $token_service->replace($mail_config->get($key . '.subject'), $variables, $token_options);
   $message['body'][] = $token_service->replace($mail_config->get($key . '.body'), $variables, $token_options);
 
@@ -1049,7 +1081,11 @@ function user_role_names($membersonly = FALSE, $permission = NULL) {
  */
 function user_user_role_insert(RoleInterface $role) {
   // Ignore the authenticated and anonymous roles or the role is being synced.
-  if (in_array($role->id(), array(DRUPAL_AUTHENTICATED_RID, DRUPAL_ANONYMOUS_RID)) || $role->isSyncing()) {
+  if (in_array($role->id(), array(
+      DRUPAL_AUTHENTICATED_RID,
+      DRUPAL_ANONYMOUS_RID
+    )) || $role->isSyncing()
+  ) {
     return;
   }
 
@@ -1086,7 +1122,11 @@ function user_user_role_insert(RoleInterface $role) {
  */
 function user_user_role_delete(RoleInterface $role) {
   // Ignore the authenticated and anonymous roles or the role is being synced.
-  if (in_array($role->id(), array(DRUPAL_AUTHENTICATED_RID, DRUPAL_ANONYMOUS_RID)) || $role->isSyncing()) {
+  if (in_array($role->id(), array(
+      DRUPAL_AUTHENTICATED_RID,
+      DRUPAL_ANONYMOUS_RID
+    )) || $role->isSyncing()
+  ) {
     return;
   }
 
@@ -1174,7 +1214,7 @@ function user_role_load($rid) {
  *   determines whether to grant or revoke that permission. Any value that
  *   evaluates to TRUE will cause the permission to be granted. Any value that
  *   evaluates to FALSE will cause the permission to be revoked.
- *   @code
+ * @code
  *     array(
  *       'administer nodes' => 0,                // Revoke 'administer nodes'
  *       'administer blocks' => FALSE,           // Revoke 'administer blocks'
@@ -1182,7 +1222,7 @@ function user_role_load($rid) {
  *       'access content' => TRUE,               // Grant 'access content'
  *       'access comments' => 'access comments', // Grant 'access comments'
  *     )
- *   @endcode
+ * @endcode
  *   Existing permissions are not changed, unless specified in $permissions.
  *
  * @see user_role_grant_permissions()
@@ -1289,11 +1329,15 @@ function _user_mail_notify($op, $account, $langcode = NULL) {
     if (empty($site_mail)) {
       $site_mail = ini_get('sendmail_from');
     }
-    $mail = \Drupal::service('plugin.manager.mail')->mail('user', $op, $account->getEmail(), $langcode, $params, $site_mail);
+    $mail = \Drupal::service('plugin.manager.mail')
+      ->mail('user', $op, $account->getEmail(), $langcode, $params, $site_mail);
     if ($op == 'register_pending_approval') {
       // If a user registered requiring admin approval, notify the admin, too.
       // We use the site default language for this.
-      \Drupal::service('plugin.manager.mail')->mail('user', 'register_pending_approval_admin', $site_mail, \Drupal::languageManager()->getDefaultLanguage()->getId(), $params);
+      \Drupal::service('plugin.manager.mail')
+        ->mail('user', 'register_pending_approval_admin', $site_mail, \Drupal::languageManager()
+          ->getDefaultLanguage()
+          ->getId(), $params);
     }
   }
   return empty($mail) ? NULL : $mail['result'];
@@ -1434,7 +1478,7 @@ function user_toolbar() {
     );
   }
   else {
-     $links = array(
+    $links = array(
       'login' => array(
         'title' => t('Log in'),
         'url' => Url::fromRoute('user.page'),
@@ -1480,7 +1524,8 @@ function user_toolbar() {
 function user_logout() {
   $user = \Drupal::currentUser();
 
-  \Drupal::logger('user')->notice('Session closed for %name.', array('%name' => $user->getUsername()));
+  \Drupal::logger('user')
+    ->notice('Session closed for %name.', array('%name' => $user->getUsername()));
 
   \Drupal::moduleHandler()->invokeAll('user_logout', array($user));
 
