diff --git a/src/Form/ApproveUserForm.php b/src/Form/ApproveUserForm.php
index f35bc9c..94005ad 100644
--- a/src/Form/ApproveUserForm.php
+++ b/src/Form/ApproveUserForm.php
@@ -66,11 +66,11 @@ class ApproveUserForm extends FormBase
 
 			if($user->save())
 			{
-				drupal_set_message($this->t("%username's account has been activated", array('%username' => $user->getDisplayName())));
+				$this->messenger()->addMessage($this->t("%username's account has been activated", array('%username' => $user->getDisplayName())));
 			}
 			else
 			{
-				drupal_set_message($this->t('Sorry, an unknown error occurred'));
+				$this->messenger()->addMessage($this->t('Sorry, an unknown error occurred'));
 			}
 		}
 	}
diff --git a/src/Service/PendingUserNotificationService.php b/src/Service/PendingUserNotificationService.php
index 89c9547..ecf2d1c 100644
--- a/src/Service/PendingUserNotificationService.php
+++ b/src/Service/PendingUserNotificationService.php
@@ -10,6 +10,7 @@ namespace Drupal\pending_user_notification\Service;
 
 use Drupal\Core\Database\Connection;
 use Drupal\pending_user_notification\Service\PendingUserNotificationServiceInterface;
+use Drupal\user\Entity\User;
 
 class PendingUserNotificationService implements PendingUserNotificationServiceInterface
 {
@@ -58,6 +59,6 @@ class PendingUserNotificationService implements PendingUserNotificationServiceIn
 			->execute()
 			->fetchCol();
 
-		return user_load_multiple($uids);
+		return User::loadMultiple($uids);
 	}
 }
