Skip to content

Commit

Permalink
Minor fix to extract all sites for the multi-site features
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Jan 17, 2020
1 parent 6a7207c commit d222963
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion onelogin-saml-sso/php/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ function onelogin_saml_configuration_multisite_enabler() {
$enable_on_sites = $_POST['enable_saml_in_site'];
}

$sites = get_sites();
$opts = array('number' => 500);
$sites = get_sites($opts);
foreach ($sites as $site) {
$value = false;
if (in_array($site->id, $enable_on_sites)) {
Expand Down
3 changes: 2 additions & 1 deletion onelogin-saml-sso/php/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ function is_saml_enabled() {
}

function enroll_user_on_sites($user_id, $role) {
$sites = get_sites();
$opts = array('number' => 500);
$sites = get_sites($opts);
foreach ($sites as $site) {
if (get_blog_option($site_id, "onelogin_saml_autocreate") && !is_user_member_of_blog($user_id, $site->id)) {
$result = add_user_to_blog($site->id, $user_id, $role);
Expand Down
3 changes: 2 additions & 1 deletion onelogin-saml-sso/php/network_saml_enabler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<form method="post" action="edit.php?action=network_saml_enabler">
<?php

$sites = get_sites();
$opts = array('number' => 500);
$sites = get_sites($opts);

echo '<table class="form-table"><tbody>';
echo '<tr><th scope="row" style="font-weight: normal;">Select/Unselect All</th><td><input type="checkbox" id="selector"></td></tr>';
Expand Down
3 changes: 2 additions & 1 deletion onelogin-saml-sso/php/network_saml_injection.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<form method="post" action="edit.php?action=network_saml_injection">
<?php

$sites = get_sites();
$opts = array('number' => 500);
$sites = get_sites($opts);

echo '<table class="form-table"><tbody>';
echo '<tr><th scope="row" style="font-weight: normal;">Select/Unselect All</th><td><input type="checkbox" id="selector"></td></tr>';
Expand Down

0 comments on commit d222963

Please sign in to comment.