本文整理汇总了PHP中PermissionsManager::getUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP PermissionsManager::getUsers方法的具体用法?PHP PermissionsManager::getUsers怎么用?PHP PermissionsManager::getUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PermissionsManager
的用法示例。
在下文中一共展示了PermissionsManager::getUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verifyAddRights
<div style="margin:10px">
*Administrators and editors automatically inherit protected species viewing rights
</div>
</fieldset>
<?php
}
?>
<fieldset style="margin:15px;padding:15px;">
<legend><b>Add a User</b></legend>
<form name="addrights" action="collpermissions.php" method="post" onsubmit="return verifyAddRights(this)">
<div>
<select name="uid">
<option value="">Select User</option>
<option value="">-----------------------------------</option>
<?php
$userArr = $permManager->getUsers();
foreach ($userArr as $uid => $uName) {
echo '<option value="' . $uid . '">' . $uName . '</option>';
}
?>
</select>
</div>
<div style="margin:5px 0px 5px 0px;">
<?php
if ($isGenObs) {
?>
<input name="righttype" type="hidden" value="editor" />
<?php
} else {
?>
<input name="righttype" type="radio" value="admin" /> Administrator <br/>
示例2: foreach
</div>
<?php
}
}
}
?>
<input type="hidden" name="userid" value="<?php
echo $userId;
?>
" />
</fieldset>
</form>
</fieldset>
<?php
} else {
$users = $userManager->getUsers($searchTerm);
echo "<h1>Users</h1>";
foreach ($users as $id => $name) {
echo "<div><a href='usermanagement.php?userid={$id}'>{$name}</a></div>";
}
}
} else {
echo "<h3>You must login and have administrator permissions to manage users</h3>";
}
?>
</div>
<?php
include $serverRoot . '/footer.php';
?>