diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAccessAlterTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAccessAlterTest.php
new file mode 100644
index 0000000..9fd021f
--- /dev/null
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAccessAlterTest.php
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\user\Tests\UserPermissionsTest.
+ */
+
+namespace Drupal\user\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+class UserAccessAlterTest extends WebTestBase {
+  protected $web_user;
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  //public static $modules = array('user_access_alter_test');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'User access alter',
+      'description' => 'Verify that user access can be altered via code.',
+      'group' => 'User'
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+    variable_set('date_default_timezone', 'America/Los_Angeles');
+    module_enable(array('user_access_alter_test'));
+    $this->web_user = $this->drupalCreateUser(array('administer permissions', 'access user profiles', 'administer site configuration', 'administer modules', 'administer users'));
+
+  }
+
+  /**
+   * Change user permissions and check user_access().
+   */
+  function testUserAccessChanges() {
+    // Unaltered permission.
+    $this->drupalLogin($this->web_user);
+    $account = $this->web_user;
+    $this->assertFalse(user_access('user lives in santiago', $account), 'User does not have altered permission.');
+
+    $this->web_user->timezone = 'America/Santiago';
+    $this->web_user->save();
+    drupal_static_reset('user_access');
+    $account = $this->web_user;
+
+    // Altered permission.
+    $this->assertTrue(user_access('user lives in santiago', $account), 'User has altered permission.');
+  }
+}
diff --git a/core/modules/user/tests/user_access_alter_test/user_access_alter_test.info b/core/modules/user/tests/user_access_alter_test/user_access_alter_test.info
new file mode 100644
index 0000000..aae9b63
--- /dev/null
+++ b/core/modules/user/tests/user_access_alter_test/user_access_alter_test.info
@@ -0,0 +1,6 @@
+name = "User access alter tests"
+description = "Support module for user access alter testing."
+package = Testing
+version = VERSION
+core = 8.x
+hidden = TRUE
diff --git a/core/modules/user/tests/user_access_alter_test/user_access_alter_test.module b/core/modules/user/tests/user_access_alter_test/user_access_alter_test.module
new file mode 100644
index 0000000..d9738b4
--- /dev/null
+++ b/core/modules/user/tests/user_access_alter_test/user_access_alter_test.module
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @file
+ * Dummy module implementing a form to test user password validation
+ */
+
+/**
+ * Implements user_access_alter().
+ *
+ * Sets up a form that allows a user to validate password.
+ */
+function user_access_alter_test_user_access_alter(&$permissions, $account = NULL) {
+  // Add permission if a user has the America/Santiago timezone.
+  if (isset($account->timezone) && $account->timezone == 'America/Santiago') {
+    $permissions['user lives in santiago'] = true;
+  }
+}
\ No newline at end of file
diff --git a/core/modules/user/tests/user_form_test.info b/core/modules/user/tests/user_form_test.info
deleted file mode 100644
index ed2f39e..0000000
--- a/core/modules/user/tests/user_form_test.info
+++ /dev/null
@@ -1,6 +0,0 @@
-name = "User module form tests"
-description = "Support module for user form testing."
-package = Testing
-version = VERSION
-core = 8.x
-hidden = TRUE
diff --git a/core/modules/user/tests/user_form_test.module b/core/modules/user/tests/user_form_test.module
deleted file mode 100644
index 5702c53..0000000
--- a/core/modules/user/tests/user_form_test.module
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-/**
- * @file
- * Dummy module implementing a form to test user password validation
- */
-
-/**
- * Implements hook_menu().
- *
- * Sets up a form that allows a user to validate password.
- */
-function user_form_test_menu() {
-  $items = array();
-  $items['user_form_test_current_password/%user'] = array(
-    'title' => 'User form test for current password validation',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('user_form_test_current_password',1),
-    'access arguments' => array('administer users'),
-    'type' => MENU_SUGGESTED_ITEM,
-  );
-  return $items;
-}
-
-/**
- * A test form for user_validate_current_pass().
- */
-function user_form_test_current_password($form, &$form_state, $account) {
-  $account->user_form_test_field = '';
-  $form_state['user'] = $account;
-
-  $form['user_form_test_field'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Test field'),
-    '#description' => t('A field that would require a correct password to change.'),
-    '#required' => TRUE,
-  );
-
-  $form['current_pass'] = array(
-    '#type' => 'password',
-    '#title' => t('Current password'),
-    '#size' => 25,
-    '#description' => t('Enter your current password'),
-  );
-
-  $form['current_pass_required_values'] = array(
-    '#type' => 'value',
-    '#value' => array('user_form_test_field' => t('Test field')),
-  );
-
-  $form['#validate'][] = 'user_validate_current_pass';
-  $form['submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Test'),
-  );
-  return $form;
-}
-
-/**
- * Submit function for the test form for user_validate_current_pass().
- */
-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/tests/user_form_test/user_form_test.info b/core/modules/user/tests/user_form_test/user_form_test.info
new file mode 100644
index 0000000..ed2f39e
--- /dev/null
+++ b/core/modules/user/tests/user_form_test/user_form_test.info
@@ -0,0 +1,6 @@
+name = "User module form tests"
+description = "Support module for user form testing."
+package = Testing
+version = VERSION
+core = 8.x
+hidden = TRUE
diff --git a/core/modules/user/tests/user_form_test/user_form_test.module b/core/modules/user/tests/user_form_test/user_form_test.module
new file mode 100644
index 0000000..5702c53
--- /dev/null
+++ b/core/modules/user/tests/user_form_test/user_form_test.module
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * @file
+ * Dummy module implementing a form to test user password validation
+ */
+
+/**
+ * Implements hook_menu().
+ *
+ * Sets up a form that allows a user to validate password.
+ */
+function user_form_test_menu() {
+  $items = array();
+  $items['user_form_test_current_password/%user'] = array(
+    'title' => 'User form test for current password validation',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('user_form_test_current_password',1),
+    'access arguments' => array('administer users'),
+    'type' => MENU_SUGGESTED_ITEM,
+  );
+  return $items;
+}
+
+/**
+ * A test form for user_validate_current_pass().
+ */
+function user_form_test_current_password($form, &$form_state, $account) {
+  $account->user_form_test_field = '';
+  $form_state['user'] = $account;
+
+  $form['user_form_test_field'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Test field'),
+    '#description' => t('A field that would require a correct password to change.'),
+    '#required' => TRUE,
+  );
+
+  $form['current_pass'] = array(
+    '#type' => 'password',
+    '#title' => t('Current password'),
+    '#size' => 25,
+    '#description' => t('Enter your current password'),
+  );
+
+  $form['current_pass_required_values'] = array(
+    '#type' => 'value',
+    '#value' => array('user_form_test_field' => t('Test field')),
+  );
+
+  $form['#validate'][] = 'user_validate_current_pass';
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Test'),
+  );
+  return $form;
+}
+
+/**
+ * Submit function for the test form for user_validate_current_pass().
+ */
+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.module b/core/modules/user/user.module
index 68b45ea..321cefb 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -466,6 +466,7 @@ function user_access($string, $account = NULL) {
     foreach ($role_permissions as $one_role) {
       $perms += $one_role;
     }
+    drupal_alter('user_access', $perms, $account);
     $perm[$account->uid] = $perms;
   }
 
