summaryrefslogtreecommitdiffstats
path: root/modules/adduser.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/adduser.inc.php')
-rw-r--r--modules/adduser.inc.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/adduser.inc.php b/modules/adduser.inc.php
index 7e03b040..3e49a78a 100644
--- a/modules/adduser.inc.php
+++ b/modules/adduser.inc.php
@@ -27,10 +27,13 @@ if (isset($_POST['action']) && $_POST['action'] === 'adduser') {
function render_module()
{
+ // A user was added. Show success message and bail out
if (isset($adduser_success)) {
Message::addInfo('adduser-success');
return;
}
+ // No user was added, check if current user is allowed to add a new user
+ // Currently you can only add users if there is no user yet. :)
if (Database::queryFirst('SELECT userid FROM user LIMIT 1') !== false) {
Message::addError('adduser-disabled');
} else {