@@ -795,6 +795,13 @@ function zoom_get_alternative_host_array_from_string($alternativehoststring) {
795795 // The Zoom API has historically returned either semicolons or commas, so we need to support both.
796796 $ alternativehoststring = str_replace ('; ' , ', ' , $ alternativehoststring );
797797 $ alternativehostarray = array_filter (explode (', ' , $ alternativehoststring ));
798+
799+ // Lowercase email addresses so that we can do case-insensitive comparisons.
800+ foreach ($ alternativehostarray as $ key => $ value ) {
801+ if (filter_var ($ value , FILTER_VALIDATE_EMAIL ) !== false ) {
802+ $ alternativehostarray [$ key ] = strtolower ($ value );
803+ }
804+ }
798805 return $ alternativehostarray ;
799806}
800807
@@ -962,7 +969,12 @@ function zoom_load_meeting($id, $context, $usestarturl = true) {
962969
963970 $ userisrealhost = (zoom_get_user_id (false ) === $ zoom ->host_id );
964971 $ alternativehosts = zoom_get_alternative_host_array_from_string ($ zoom ->alternative_hosts );
965- $ userishost = ($ userisrealhost || in_array (zoom_get_api_identifier ($ USER ), $ alternativehosts , true ));
972+ // Lowercase email addresses so that we can do case-insensitive comparisons.
973+ if (filter_var (zoom_get_api_identifier ($ USER ), FILTER_VALIDATE_EMAIL ) !== false ) {
974+ $ userishost = ($ userisrealhost || in_array (strtolower (zoom_get_api_identifier ($ USER )), $ alternativehosts , true ));
975+ } else {
976+ $ userishost = ($ userisrealhost || in_array (zoom_get_api_identifier ($ USER ), $ alternativehosts , true ));
977+ }
966978
967979 // Check if we should use the start meeting url.
968980 if ($ userisrealhost && $ usestarturl ) {
0 commit comments