diff --git a/openid_openid_connect_migrate.drush.inc b/openid_openid_connect_migrate.drush.inc
index 3aa0770..c2c92e2 100644
--- a/openid_openid_connect_migrate.drush.inc
+++ b/openid_openid_connect_migrate.drush.inc
@@ -48,7 +48,9 @@ function drush_openid_openid_connect_migrate($client_name = 'generic') {
   }
 
   // Get all OpenID associations.
-  $query = db_select('authmap', 'a')
+  // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+  // You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
+  $query = \Drupal::database()->select('authmap', 'a')
     ->fields('a', ['uid', 'authname', 'module'])
     ->condition('module', 'openid');
   $result = $query->execute();
@@ -60,7 +62,9 @@ function drush_openid_openid_connect_migrate($client_name = 'generic') {
 
   foreach ($result as $record) {
     // Check if an association already exists.
-    $query = db_select('authmap', 'a')
+    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+    // You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
+    $query = \Drupal::database()->select('authmap', 'a')
       ->fields('a', ['uid', 'authname', 'module'])
       ->condition('uid', $record->uid)
       ->condition('module', 'openid_connect_' . check_plain($client_name));
@@ -68,7 +72,7 @@ function drush_openid_openid_connect_migrate($client_name = 'generic') {
 
     // If no association exists, create it.
     if (!$num_rows) {
-      $account = user_load($record->uid);
+      $account = \Drupal::service('entity_type.manager')->getStorage('user')->load($record->uid);
       openid_connect_connect_account(
         $account,
         $client_name,
