mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Allow users to be returned as a Optionslist
This commit is contained in:
parent
484fa1d265
commit
1ce641d1d1
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,15 @@ if (isset($_GET['action'])) {
|
||||||
if ($action == "list") {
|
if ($action == "list") {
|
||||||
$users = get_all_users();
|
$users = get_all_users();
|
||||||
jtable_respond($users);
|
jtable_respond($users);
|
||||||
|
} elseif ($action == "listoptions") {
|
||||||
|
$users = get_all_users();
|
||||||
|
$retusers = [];
|
||||||
|
foreach ($users as $user) {
|
||||||
|
$retusers[] = array (
|
||||||
|
'DisplayText' => $user['emailaddress'],
|
||||||
|
'Value' => $user['emailaddress']);
|
||||||
|
}
|
||||||
|
jtable_respond($retusers, 'options');
|
||||||
} elseif ($action == "create" or $action == "update") {
|
} elseif ($action == "create" or $action == "update") {
|
||||||
if (valid_user($_POST['emailaddress']) === FALSE) {
|
if (valid_user($_POST['emailaddress']) === FALSE) {
|
||||||
jtable_respond(null, 'error', "Please only use ^[a-z0-9@_.-]+$ for usernames");
|
jtable_respond(null, 'error', "Please only use ^[a-z0-9@_.-]+$ for usernames");
|
||||||
|
|
Loading…
Add table
Reference in a new issue