forked from science-ation/science-ation
Fix passing in role list by ids
This commit is contained in:
parent
3971df267f
commit
0bcd811101
2
api.php
2
api.php
@ -642,7 +642,7 @@ switch($request[0]) {
|
||||
if(is_array($reqroles)) {
|
||||
for($x=0;$x<count($reqroles);$x++) {
|
||||
if(is_numeric($reqroles[$x]))
|
||||
$reqroles[$x]=$roles_by_id[$reqroles[$x]];
|
||||
$reqroles[$x]=$roles_by_id[$reqroles[$x]]['type'];
|
||||
if(!array_key_exists($reqroles[$x],$roles))
|
||||
unset($reqroles[$x]);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ Remove a role from this account
|
||||
<form method="post" action="api/registration/fields">
|
||||
<?
|
||||
foreach($roles AS $role=>$r) {
|
||||
echo "<label><input type=\"checkbox\" name=\"roles[]\" value=\"{$role}\">$role</label><br />\n";
|
||||
echo "<label><input type=\"checkbox\" name=\"roles[]\" value=\"{$r['type']}\">$role</label><br />\n";
|
||||
}?>
|
||||
<input type="submit" value="List Registration Fields for Selected Roles">
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user