浏览代码

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

causefx 7 年之前
父节点
当前提交
041763bc9e
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;