Skip to content

Commit

Permalink
updating to use libAurora.php, but it seems both usernames are reserv…
Browse files Browse the repository at this point in the history
…ed until the grid is reset and similarly the old username logs the user in under the new name but the new name does not let them log in until the grid is reset
  • Loading branch information
SignpostMarv committed Mar 25, 2012
1 parent 00e0d7f commit 743002e
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions www/sites/account/changeaccount.php
Expand Up @@ -118,31 +118,12 @@ function code_gen($cod="") {
}
}

if ($_POST[Submit4] == $webui_submit) {
$found = array();
$found[0] = json_encode(array('Method' => 'CheckIfUserExists', 'WebPassword' => md5(WEBUI_PASSWORD),
'Name' => cleanQuery($_POST[nameNew])));
$do_post_requested = do_post_request($found);
$recieved = json_decode($do_post_requested);


if ($recieved->{'Verified'} != false) {
if (isset($_POST['Submit4']) && $_POST['Submit4'] == $webui_submit) {
if (Configs::d()->CheckIfUserExists($_POST['nameNew'])) {
$ERRORS2 = "<font color=white><b>User already Exists</b></font>";
} else {
$found = array();
$found[0] = json_encode(array('Method' => 'ChangeName', 'WebPassword' => md5(WEBUI_PASSWORD)
, 'UUID' => cleanQuery($_SESSION[USERID])
, 'Name' => cleanQuery($_POST[nameNew])));

$do_post_requested = do_post_request($found);
$recieved = json_decode($do_post_requested);

// echo '<pre>';
// var_dump($recieved);
// var_dump($do_post_requested);
// echo '</pre>';

if ($recieved->{'Verified'} == "true") {
if (Configs::d()->ChangeName($_SESSION['USERID'], $_POST['nameNew'])) {
//-----------------------------------MAIL--------------------------------------
$date_arr = getdate();
$date = "$date_arr[mday].$date_arr[mon].$date_arr[year]";
Expand All @@ -152,17 +133,14 @@ function code_gen($cod="") {
$body .= "\n\n\n";
$body .= "Thank you for using " . SYSNAME . "";
$header = "From: " . SYSMAIL . "\r\n";
$mail_status = mail($sendto, $subject, $body, $header);
$mail_status = @mail($sendto, $subject, $body, $header);
//-----------------------------MAIL END --------------------------------------

session_unset();
session_destroy();

echo "<script language='javascript'>
<!--
window.location.href='index.php?page=home';
// -->
</script>";
header('Location: ' . SYSURL . 'index.php?page=home');
exit;
}
}
}
Expand Down

0 comments on commit 743002e

Please sign in to comment.