Просмотр исходного кода

Move machine ID check outside of foreach - Attempt to fix #1014

causefx 7 лет назад
Родитель
Сommit
26b255220e
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      api/functions/auth-functions.php

+ 6 - 6
api/functions/auth-functions.php

@@ -83,12 +83,12 @@ function checkPlexUser($username)
 								if ((string)$server['machineIdentifier'] == $GLOBALS['plexID']) {
 									$machineMatches = true;
 								}
-								if ($machineMatches) {
-									writeLog('success', 'Plex User Check - User Approved for Login', $username);
-									return true;
-								} else {
-									writeLog('error', 'Plex User Check - User not Approved User', $username);
-								}
+							}
+							if ($machineMatches) {
+								writeLog('success', 'Plex User Check - User Approved for Login', $username);
+								return true;
+							} else {
+								writeLog('error', 'Plex User Check - User not Approved User', $username);
 							}
 						}
 					}