"description"=>"Adds a organiser page that lets moderators (or better) control the reegistered user accounts, and perform adminstrative actions such as password resets, and adding / removing accounts.",
"id"=>"feature-user-table",
"code"=>function(){
global$settings,$env;
/**
*@api{get}?action=user-tableGettheusertable
*@apiNameUserTable
*@apiGroupSettings
*@apiPermissionModerator
*/
/*
*████████████████████████
*████████████
*███████████████████████████
*████████████
*████████████████████████
*
*████████████████████████████
*██████████████
*██████████████████████
*██████████████
*██████████████████████████
*/
add_action("user-table",function(){
global$settings,$env;
if(!$env->is_logged_in||!$env->is_admin){
http_response_code(401);
exit(page_renderer::render_main("Unauthorised - User Table - $settings->sitename","<p>Only moderators (or better) may access the user table. You could try <a href='?action=logout'>logging out</a> and then <a href='?action=login&returnto%2Findex.php%3Faction%3Duser-table'>logging in</a> again as a moderator, or alternatively visit the <a href='?action=user-list'>user list</a> instead, if that's what you're after.</p>"));
}
$content="<h2>User Table</h2>
<p>(Warning!Deletingauserwillwipe<em>all</em>theiruserdata!Itwon't delete any pages they'vecreated,theiruserpage,ortheiravatarthough,asthosearepartofthewikiitself.)</p>
exit(page_renderer::render_main("Error: Unauthorised - Add User - $settings->sitename","<p>Only moderators (or better) may create users. You could try <a href='?action=logout'>logging out</a> and then <a href='?action=login&returnto%2Findex.php%3Faction%3Duser-table'>logging in</a> again as a moderator, or alternatively visit the <a href='?action=user-list'>user list</a> instead, if that's what you're after.</p>"));
exit(page_renderer::render_main("Error: Invalid Username - Add User - $settings->sitename","<p>The username <code>".htmlentities($new_username)."</code> contains some invalid characters. Only <code>a-z</code>, <code>A-Z</code>, <code>0-9</code>, <code>-</code>, and <code>_</code> are allowed in usernames. <a href='javascript:window.history.back();'>Go back</a>.</p>"));
// TODO: Save new user's data, display the password to the admin, and send email if we're able to
});
if($env->is_admin)add_help_section("949-user-table","Managing User Accounts","<p>As a moderator on $settings->sitename, you can use the <a href='?action=user-table'>User Table</a> to adminstrate the user accounts on $settings->sitename. It allows you to perform actions such as adding and removing accounts, and resetting passwords.</p>");