Explorar o código

Added login with plex email and plex username for oauth - will work on plex org backend next

causefx %!s(int64=7) %!d(string=hai) anos
pai
achega
041763bc9e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/functions/api-functions.php

+ 1 - 1
api/functions/api-functions.php

@@ -66,7 +66,7 @@ function login($array)
 								'token' => $tokenInfo['user']['authToken']
 							);
 							coookie('set', 'oAuth', 'true', $GLOBALS['rememberMeDays']);
-							$authSuccess = ((!empty($GLOBALS['plexAdmin']) && strtolower($GLOBALS['plexAdmin']) == strtolower($tokenInfo['user']['username'])) || checkPlexUser($tokenInfo['user']['username'])) ? $authSuccess : false;
+							$authSuccess = ((!empty($GLOBALS['plexAdmin']) && strtolower($GLOBALS['plexAdmin']) == strtolower($tokenInfo['user']['username'])) || (!empty($GLOBALS['plexAdmin']) && strtolower($GLOBALS['plexAdmin']) == strtolower($tokenInfo['user']['email'])) || checkPlexUser($tokenInfo['user']['username'])) ? $authSuccess : false;
 						}
 					}
 					break;