<?php
if( ! function_exists('o365_get_o365_activated_plugin') ) {
    function o365_get_o365_activated_plugin() {
        $office365ActivatedPlugins = o365_get_all_plugins_info();
        /* Remove user auth plugin from the array */
        unset($office365ActivatedPlugins['o365-user-authentication']);

        $only_free_user_auth_is_activated = false;

        foreach( $office365ActivatedPlugins as $plugin_name => $plugin_file_name ) {
            $plugin = $plugin_name . "/" . $plugin_file_name['file'];
            if( is_plugin_active($plugin) ) {
                $only_free_user_auth_is_activated = true;
            }
        }
        return $only_free_user_auth_is_activated;
    }
}
?>