diff options
-rw-r--r-- | www/commission/index.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/www/commission/index.php b/www/commission/index.php index ae5e2ee..c4fdb65 100644 --- a/www/commission/index.php +++ b/www/commission/index.php @@ -50,7 +50,11 @@ function chk_username($userid) { if($_SERVER["REQUEST_METHOD"] == "POST"){ $mismatch = 1; // We have two different passwords - $reset = trim($_POST["reset"]); + if (!array_key_exists("reset",$_POST)) { + $reset = ""; + } else { + $reset = trim($_POST["reset"]); + } syslog(LOG_ALERT, "Reset: $reset"); if ($reset === "Reset") { $save_password = ""; @@ -149,6 +153,9 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ $handle = popen($cmd, 'r'); $username_err = trim(fread($handle, 4192)); $status = pclose($handle); + if(! isset($result)) { + $result = ""; + } syslog(LOG_ALERT, "useradd: status: $status result: $result"); $uid = chk_username($username); if ($uid === -1) { |