diff --git a/admin_roles.php b/admin_roles.php
index d0b5005df..929130318 100644
--- a/admin_roles.php
+++ b/admin_roles.php
@@ -45,11 +45,6 @@
-
diff --git a/functions.php b/functions.php
index 108b80183..0711b222e 100644
--- a/functions.php
+++ b/functions.php
@@ -1356,13 +1356,13 @@ function lookupUserPermission($module) {
$mysqli,
"SELECT
urp.user_role_permission_level
- FROM
+ FROM
modules AS m
- JOIN
+ JOIN
user_role_permissions AS urp
- ON
+ ON
m.module_id = urp.module_id
- WHERE
+ WHERE
m.module_name = '$module' AND urp.user_role_id = $session_user_role"
);