Browse Source

Added strict and plex admin to Plex SSO section of debug

causefx 6 years ago
parent
commit
9aa94bcd11
1 changed files with 15 additions and 0 deletions
  1. 15 0
      api/functions/organizr-functions.php

+ 15 - 0
api/functions/organizr-functions.php

@@ -1,4 +1,17 @@
 <?php
+function checkPlexAdminFilled()
+{
+	if ($GLOBALS['plexAdmin'] == '') {
+		return false;
+	} else {
+		if ((strpos($GLOBALS['plexAdmin'], '@') !== false)) {
+			return 'email';
+		} else {
+			return 'username';
+		}
+	}
+}
+
 function organizrSpecialSettings()
 {
 	$refreshSearch = "Refresh";
@@ -39,6 +52,8 @@ function organizrSpecialSettings()
 				'cookie' => isset($_COOKIE['mpt']) ? true : false,
 				'machineID' => (strlen($GLOBALS['plexID']) == 40) ? true : false,
 				'token' => ($GLOBALS['plexToken'] !== '') ? true : false,
+				'plexAdmin' => checkPlexAdminFilled(),
+				'strict' => ($GLOBALS['plexStrictFriends']) ? true : false,
 				'oAuthEnabled' => ($GLOBALS['plexoAuth']) ? true : false,
 				'backend' => ($GLOBALS['authBackend'] == 'plex') ? true : false,
 			),