From 853768bc1e1cc321ce3853ac04036c9ed72ff5b1 Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Fri, 14 Aug 2020 15:51:24 -0400
Subject: [PATCH] ISTWCMS-4025: fixing check for user1 when removing manage
 link in toolbar

---
 uw_cfg_common.module | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/uw_cfg_common.module b/uw_cfg_common.module
index 37503874..476a7f0f 100644
--- a/uw_cfg_common.module
+++ b/uw_cfg_common.module
@@ -146,8 +146,9 @@ function uw_cfg_common_toolbar_alter(&$items) {
   // Get the current user.
   $current_user = \Drupal::currentUser();
 
+  $user_id = $current_user->id();
   // Ensure that the current user is not user1.
-  if ($current_user->id() !== 1) {
+  if ($current_user->id() !== '1') {
 
     // Get the roles of the user.
     $roles = $current_user->getRoles();
-- 
GitLab