diff core/modules/user/user.api.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line diff
--- a/core/modules/user/user.api.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/user/user.api.php	Thu May 09 15:34:47 2019 +0100
@@ -58,7 +58,7 @@
         ->execute();
       node_mass_update($nodes, ['uid' => 0], NULL, TRUE);
       // Anonymize old revisions.
-      db_update('node_field_revision')
+      \Drupal::database()->update('node_field_revision')
         ->fields(['uid' => 0])
         ->condition('uid', $account->id())
         ->execute();
@@ -150,11 +150,11 @@
   if (!$account->getTimezone() && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) {
     \Drupal::messenger()
       ->addStatus(t('Configure your <a href=":user-edit">account time zone setting</a>.', [
-        ':user-edit' => $account->url('edit-form', [
+        ':user-edit' => $account->toUrl('edit-form', [
           'query' => \Drupal::destination()
             ->getAsArray(),
           'fragment' => 'edit-timezone',
-        ]),
+        ])->toString(),
       ]));
   }
 }
@@ -166,7 +166,7 @@
  *   The user object on which the operation was just performed.
  */
 function hook_user_logout(AccountInterface $account) {
-  db_insert('logouts')
+  \Drupal::database()->insert('logouts')
     ->fields([
       'uid' => $account->id(),
       'time' => time(),