Переглянути джерело

Add header to auth line for current user

causefx 7 роки тому
батько
коміт
b8de572fb7
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      api/functions/organizr-functions.php

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

@@ -1547,6 +1547,7 @@ function auth()
 	}
 	}
 	if ($group !== null) {
 	if ($group !== null) {
 		if (qualifyRequest($group) && $unlocked) {
 		if (qualifyRequest($group) && $unlocked) {
+			header("X-Organizr-User: $currentUser");
 			!$debug ? exit(http_response_code(200)) : die("$userInfo Authorized");
 			!$debug ? exit(http_response_code(200)) : die("$userInfo Authorized");
 		} else {
 		} else {
 			!$debug ? exit(http_response_code(401)) : die("$userInfo Not Authorized");
 			!$debug ? exit(http_response_code(401)) : die("$userInfo Not Authorized");