mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 23:36:18 +00:00
fixed change email on shard
This commit is contained in:
parent
bfe319bd2d
commit
bdff3eb81a
4 changed files with 6 additions and 4 deletions
|
@ -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"));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -116,13 +116,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}error{/if}">
|
||||
<div class="control-group {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE" and isset($do)}error{/if}">
|
||||
<label class="control-label">Email</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span style="margin-left:5px;" class="add-on"><i class="icon-envelope"></i></span>
|
||||
<input type="text" class="input-xlarge" id="Email" name="Email" placeholder="Email" {if isset($prevEmail)}value="{$prevEmail}"{/if}>
|
||||
{if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}<span class="help-inline">{$EMAIL}</span>{/if}
|
||||
{if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE" and isset($do)}<span class="help-inline">{$EMAIL}</span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue