Mercurial > hg > cmmr2012-drupal-site
diff core/modules/user/src/UserStorage.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/core/modules/user/src/UserStorage.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/modules/user/src/UserStorage.php Thu Feb 28 13:11:55 2019 +0000 @@ -21,7 +21,7 @@ // The anonymous user account is saved with the fixed user ID of 0. // Therefore we need to check for NULL explicitly. if ($entity->id() === NULL) { - $entity->uid->value = $this->database->nextId($this->database->query('SELECT MAX(uid) FROM {users}')->fetchField()); + $entity->uid->value = $this->database->nextId($this->database->query('SELECT MAX(uid) FROM {' . $this->getBaseTable() . '}')->fetchField()); $entity->enforceIsNew(); } return parent::doSaveFieldItems($entity, $names); @@ -39,7 +39,7 @@ * {@inheritdoc} */ public function updateLastLoginTimestamp(UserInterface $account) { - $this->database->update('users_field_data') + $this->database->update($this->getDataTable()) ->fields(['login' => $account->getLastLoginTime()]) ->condition('uid', $account->id()) ->execute(); @@ -51,7 +51,7 @@ * {@inheritdoc} */ public function updateLastAccessTimestamp(AccountInterface $account, $timestamp) { - $this->database->update('users_field_data') + $this->database->update($this->getDataTable()) ->fields([ 'access' => $timestamp, ])