diff --git a/build/index.php b/build/index.php index 88d6217..ddf9644 100644 --- a/build/index.php +++ b/build/index.php @@ -396,7 +396,7 @@ if($settings->sessionprefix == "auto") ///////////////////////////////////////////////////////////////////////////// /** The version of Pepperminty Wiki currently running. */ $version = "v0.17-dev"; -$commit = "aac9d15eb946b8c53b31112d5b21d9476fa862c2"; +$commit = "5961d11e765945453569c0a85b62d05d5f459f39"; /// Environment /// /** Holds information about the current request environment. */ $env = new stdClass(); @@ -2990,7 +2990,7 @@ function render_comments($comments_data, $depth = 0) register_module([ "name" => "Settings GUI", - "version" => "0.1.1", + "version" => "0.1.2", "author" => "Starbeamrainbowlabs", "description" => "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.", "id" => "feature-guiconfig", @@ -3088,6 +3088,13 @@ SCRIPT; $reverse = true; $inputControl = "$configKey ? " checked" : "") . " />"; break; + case "usertable": + $label = ""; + if(module_exists("feature-user-table")) + $inputControl = "

The users can be managed in the User Table.

"; + else + $inputControl = "

The users can be managed in the user table, but the required module feature-user-table is not installed.

"; + break; default: $label = ""; $inputControl = "

Sorry! The $configKey setting isn't editable yet through the gui. Please try editing peppermint.json for the time being.

"; @@ -5890,7 +5897,7 @@ register_module([ if(!$env->is_logged_in || !$env->is_admin) { http_response_code(401); - exit(page_renderer::render_main("Unauthorised - User Table - $settings->sitename", "

Only moderators (or better) may access the user table. You could try logging out and then logging in again as a moderator, or alternatively visit the user list instead, if that's what you're after.

")); + exit(page_renderer::render_main("Unauthorised - User Table - $settings->sitename", "

Only moderators (or better) may access the user table. You could try logging out and then logging in again as a moderator, or alternatively visit the user list instead, if that's what you're after.

")); } $content = "

User Table

@@ -7541,7 +7548,7 @@ register_module([ // The user wants to log in $user = $_POST["user"]; $pass = $_POST["pass"]; - if(verify_password($pass, $settings->users->$user->password)) + if(!empty($settings->users->$user) && verify_password($pass, $settings->users->$user->password)) { // Success! :D diff --git a/module_index.json b/module_index.json index 6bd000b..7de3a68 100755 --- a/module_index.json +++ b/module_index.json @@ -64,11 +64,11 @@ }, { "name": "Settings GUI", - "version": "0.1.1", + "version": "0.1.2", "author": "Starbeamrainbowlabs", "description": "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.", "id": "feature-guiconfig", - "lastupdate": 1524415857, + "lastupdate": 1526250969, "optional": false }, { @@ -140,7 +140,7 @@ "author": "Starbeamrainbowlabs", "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", - "lastupdate": 1526161887, + "lastupdate": 1526250680, "optional": false }, { @@ -212,7 +212,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds a pair of actions (login and checklogin) that allow users to login. You need this one if you want your users to be able to login.", "id": "page-login", - "lastupdate": 1526038530, + "lastupdate": 1526227977, "optional": false }, { diff --git a/modules/feature-guiconfig.php b/modules/feature-guiconfig.php index b9eae58..d764d39 100644 --- a/modules/feature-guiconfig.php +++ b/modules/feature-guiconfig.php @@ -1,7 +1,7 @@ "Settings GUI", - "version" => "0.1.1", + "version" => "0.1.2", "author" => "Starbeamrainbowlabs", "description" => "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.", "id" => "feature-guiconfig", @@ -99,6 +99,13 @@ SCRIPT; $reverse = true; $inputControl = "$configKey ? " checked" : "") . " />"; break; + case "usertable": + $label = ""; + if(module_exists("feature-user-table")) + $inputControl = "

The users can be managed in the User Table.

"; + else + $inputControl = "

The users can be managed in the user table, but the required module feature-user-table is not installed.

"; + break; default: $label = ""; $inputControl = "

Sorry! The $configKey setting isn't editable yet through the gui. Please try editing peppermint.json for the time being.

"; diff --git a/modules/feature-user-table.php b/modules/feature-user-table.php index eaaafd0..70a6658 100644 --- a/modules/feature-user-table.php +++ b/modules/feature-user-table.php @@ -33,7 +33,7 @@ register_module([ if(!$env->is_logged_in || !$env->is_admin) { http_response_code(401); - exit(page_renderer::render_main("Unauthorised - User Table - $settings->sitename", "

Only moderators (or better) may access the user table. You could try logging out and then logging in again as a moderator, or alternatively visit the user list instead, if that's what you're after.

")); + exit(page_renderer::render_main("Unauthorised - User Table - $settings->sitename", "

Only moderators (or better) may access the user table. You could try logging out and then logging in again as a moderator, or alternatively visit the user list instead, if that's what you're after.

")); } $content = "

User Table