Hiding the group anonymous
Posted: 2021-07-13 20:11
Is there a way to hide the group anonymous so that it does not show up in the Admin Area, Groups, View Groups list of groups?
TD
TD
A place where AppGini users can exchange ideas and help each other.
https://forums.appgini.com:443/phpbb/
https://forums.appgini.com:443/phpbb/viewtopic.php?f=2&t=4411
Code: Select all
<!--
<li><a href="pageEditGroup.php?groupID=<?php echo sqlValue("select groupID from membership_groups where name='" . makeSafe($adminConfig['anonymousGroup']) .
"'"); ?>"><i class="glyphicon menu-item-icon text-info glyphicon-user"></i> <?php echo $Translation['edit anonymous permissions'] ; ?></a></li>
-->
Code: Select all
<!--
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-cog"></i> <?php echo $Translation['utilities']; ?> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="pageSettings.php"><i class="glyphicon menu-item-icon text-info glyphicon-cog"></i> <?php echo $Translation['admin settings']; ?></a></li>
li class="divider"></li>
<li><a href="pageTransferOwnership.php"><i class="glyphicon menu-item-icon text-info glyphicon-random"></i> <?php echo $Translation['batch transfer']; ?></a></li>
<li><a href="pageMail.php?sendToAll=1"><i class="glyphicon menu-item-icon text-info glyphicon-envelope"></i> <?php echo $Translation['mail all users']; ?></a></li>
<li class="divider"></li>
<li><a href="pageRebuildFields.php"><i class="glyphicon menu-item-icon text-info glyphicon-refresh"></i> <?php echo $Translation['view or rebuild fields']; ?></a></li>
<li><a href="pageBackupRestore.php"><i class="glyphicon menu-item-icon text-info glyphicon-tasks"></i> <?php echo $Translation['database backups']; ?></a></li>
<li><a href="pageUploadCSV.php"><i class="glyphicon menu-item-icon text-info glyphicon-upload"></i> <?php echo $Translation['import CSV']; ?></a></li>
<li><a href="pageQueryLogs.php"><i class="glyphicon menu-item-icon text-info glyphicon-book"></i> <?php echo $Translation['Query logs']; ?></a></li>
<li class="divider"></li>
<li><a href="https://forums.appgini.com" target="_blank"><i class="glyphicon menu-item-icon text-info glyphicon-new-window"></i> <?php echo $Translation['AppGini
forum']; ?></a></li>
</ul>
</li>
-->
Code: Select all
<!--
<div class="col-md-12 text-right vspacer-lg">
<label><?php echo $Translation['maintenance mode']; ?></label>
<div class="btn-group" id="toggle_maintenance_mode">
<button type="button" class="btn <?php echo $off_classes; ?>"><?php echo $Translation['OFF']; ?></button>
<button type="button" class="btn <?php echo $on_classes; ?>"><?php echo $Translation['ON']; ?></button>
</div>
</div>
-->
Code: Select all
<td class="remaining-width"><a href="pageViewGroups.php"title="<?php echo $Translation['view groups']; ?>"><i class="glyphicon glyphicon-search"></i> <?php
/* echo sqlValue("select count(1) from membership_groups"); *//* this line commented out by ADSISC */
$anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */
echo sqlValue("select count(1) from membership_groups where membership_groups.name <> ".$anonGrp); /* this line added by ADSISC */
?></a></td>
Code: Select all
while( $row = db_fetch_row($res)) {
$anonGrp = $adminConfig['anonymousGroup']; /* this line added by ADSISC */
if ($row[1] == $anonGrp) continue; /* this line added by ADSISC */
$groupMembersCount = sqlValue("select count(1) from membership_users where groupID='$row[0]'");
?>
Code: Select all
<!-- <?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups order by name", $groupID); /* this line commented out by ADSISC */ ?> -->
<?php $anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */ ?>
<?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups where membership_groups.name <> ".$anonGrp." order by name", $groupID); /* this
line added by ADSISC */ ?>
Code: Select all
while($row = db_fetch_row($res)) {
$tr_class = '';
if($adminConfig['adminUsername'] == $row[0]) $tr_class = 'warning text-bold';
if($adminConfig['anonymousMember'] == $row[0]) $tr_class = 'text-muted';
if($adminConfig['anonymousMember'] == $row[0]) continue; /* this line added by ADSISC */
?>
Code: Select all
<!-- <?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups order by name", $groupID); ?> /* this line commented out by ADSISC */ -->
<?php $anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */ ?>
<?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups where membership_groups.name <> ".$anonGrp." order by name", $groupID);
/* this line added by ADSISC */ ?>
Code: Select all
while($row = db_fetch_row($res)) {
$anonGrp = $adminConfig['anonymousGroup']; /* this line added by ADSISC */
if ($row[2] == $anonGrp) continue; /* this line added by ADSISC */
?>
Code: Select all
/* echo bootstrapSQLSelect('groupID', "select g.groupID, g.name from membership_groups g order by name", $groupID); *//* this line commented out by ADSISC */
$anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */
echo bootstrapSQLSelect('groupID', "select g.groupID, g.name from membership_groups g where g.name <> ".$anonGrp." order by name", $groupID); /* this line added by
ADSISC */