If user is set to be globally unique then hide the auto generate user option as it won't be unique per domain.

This commit is contained in:
Mark Crane 2013-12-27 18:18:50 +00:00
parent 86b757f43f
commit f1867b8835
1 changed files with 15 additions and 12 deletions

View File

@ -312,6 +312,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//add the extension to the database
if ($action == "add" && permission_exists('extension_add')) {
$user_email = '';
if ($_SESSION["user"]["unique"]["text"] != "global") {
if ($autogen_users == "true") {
$auto_user = $extension;
for ($i=1; $i<=$range; $i++) {
@ -324,6 +325,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
unset($auto_user);
}
}
for ($i=1; $i<=$range; $i++) {
if (extension_exists($extension)) {
@ -869,8 +871,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " </select>\n";
echo "<br />\n";
echo $text['description-range']."<br />\n";
if ($_SESSION["user"]["unique"]["text"] != "global") {
echo "<input type=\"checkbox\" name=\"autogen_users\" value=\"true\"> ".$text['checkbox-range']."<br>\n";
echo "\n";
}
echo "</td>\n";
echo "</tr>\n";
}