diff --git a/code/web/private_php/ams/autoload/users.php b/code/web/private_php/ams/autoload/users.php index aabdbe98e..d1d11f51f 100644 --- a/code/web/private_php/ams/autoload/users.php +++ b/code/web/private_php/ams/autoload/users.php @@ -466,12 +466,13 @@ class Users{ try { //make connection with and put into shard db $dbs = new DBLayer("shard"); - $dbs->update("user", $values, "Login = $user"); + $dbs->update("user", $values, "Login = '$user'"); return "ok"; } catch (PDOException $e) { //oh noooz, the shard is offline! Put in query queue at ams_lib db! try { + error_log($e); $dbl = new DBLayer("lib"); $dbl->insert("ams_querycache", array("type" => "change_mail", "query" => json_encode(array($user,$mail)), "db" => "shard")); diff --git a/code/web/public_php/ams/autoload/webusers.php b/code/web/public_php/ams/autoload/webusers.php index c739274c4..b674f63dd 100644 --- a/code/web/public_php/ams/autoload/webusers.php +++ b/code/web/public_php/ams/autoload/webusers.php @@ -260,7 +260,7 @@ class WebUsers extends Users{ try { //make connection with and put into shard db $dbw = new DBLayer("web"); - $dbw->update("ams_user", $values, "Login = $user"); + $dbw->update("ams_user", $values, "Login = '$user'"); } catch (PDOException $e) { //ERROR: the web DB is offline diff --git a/code/web/public_php/ams/func/add_user.php b/code/web/public_php/ams/func/add_user.php index f827a08b5..f2425ae71 100644 --- a/code/web/public_php/ams/func/add_user.php +++ b/code/web/public_php/ams/func/add_user.php @@ -53,6 +53,7 @@ function add_user(){ $pageElements['prevConfirmPass'] = $_POST["ConfirmPass"]; $pageElements['prevEmail'] = $_POST["Email"]; $pageElements['permission'] = unserialize($_SESSION['ticket_user'])->getPermission(); + $pageElements['do'] = "add_user"; helpers :: loadtemplate( 'settings', $pageElements); throw new SystemExit(); }else{ diff --git a/code/web/public_php/ams/templates/settings.tpl b/code/web/public_php/ams/templates/settings.tpl index ea0f32e34..5cc0b0672 100644 --- a/code/web/public_php/ams/templates/settings.tpl +++ b/code/web/public_php/ams/templates/settings.tpl @@ -116,13 +116,13 @@ -
+
- {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} + {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE" and isset($do)}{$EMAIL}{/if}