print "cemail = {$cemail}, nemail = {$nemail}, rnemail = {$rnemail}, password = {$password}"; if ($nemail == NULL) { $_SESSION['error'] = "<span class='error' >New Email must not be empty</span>"; } else { if ($rnemail == NULL) { $_SESSION['error'] = "<span class='error' >Re-Type New Email must not be empty</span>"; } else { if ($user->validatePasswordAndEmail($password, $cemail)) { echo "<br>valid input data"; if ($nemail == $rnemail) { $response = $user->updateEmail($nemail); if ($response == 1) { //print('successfully updated'); $_SESSION['error'] = "<span class='success' >Successfully updated</span>"; //check and send new email confirmation. if ($user->emailConfirmationStatus() == FALSE) { //send confirmation email if ($email->sendConfirmationEmail($nemail)) { $_SESSION['error'] .= '. Email not yet approved new confirmation email sent. '; } else { $_SESSION['error'] .= '. Email not yet approved new confirmation email failed to sent.'; } } } else { if ($response == 2) { // print('email exist'); $_SESSION['error'] = "<span class='error' >Email exist</span>"; } else { //print('failed to update'); $_SESSION['error'] = "<span class='error' >Failed to update</span>"; }
<head lang="en"> <meta charset="UTF-8"> <?php // require('fs_folders/php_functions/Class/User.php'); $user = new User($mc->mno, $db); $randomNumbers = rand(0, 2); ?> </head> <body> <div id="get-started-container" > <div style="height:23px;"> </div> <?php if (!$user->emailConfirmationStatus()) { ?> <div class="gs-email-container" > <div> <p> Please confirm your email by clicking the link we sent to <b> <?php echo $mc->identity_email; ?> </b> <b><a href="account?at=7&open=email"> update your email</a> </b> or <b> <a href="email-confirmation-resend" >resend email.</a></b> </p> </div> </div> <?php } ?>