本文整理匯總了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';
?>