exit; } // Check if New password is confirmed if ($newpasswd != $confirmpasswd) { print "<p align=\"center\">"; print " <font face=\"Arial\" color=\"#FF0000\">"; print " <b>New password was not confirmed!</b>"; print " </font>"; print "</p>"; exit; } // If everything is ok, use auth class to modify the record $update = $user->modify_user($USERNAME, $newpasswd, $check["team"], $check["level"], $check["status"]); if ($update) { print "<p align=\"center\">"; print " <font face=\"Arial\" color=\"#FF0000\">"; print " <b>Password Changed!</b><br>"; print " You will be required to re-login so that your session will recognize the new password. <BR>"; print " Click <a href=\"$login\">here</a> to login again."; print " </font>"; print "</p>"; } } // end - new password field is not empty ?> </body>
// Delete record in signup table $deletesignup = mysqli_query("DELETE FROM signup WHERE uname='{$username}'"); if ($delete && $deletesignup) { $message = $delete; } else { $username = ""; $password = ""; $team = "Ungrouped"; $level = ""; $status = "active"; $message = "The user has been deleted."; } } // MODIFY USER if ($action == "Modify") { $update = $user->modify_user($username, $password, $team, $level, $status); if ($update == 1) { $message = "User detail updated successfully."; } elseif ($update == "blank level") { $message = "Level field cannot be blank."; $action = ""; } elseif ($update == "sa cannot be inactivated") { $message = "This user cannot be inactivated."; $action = ""; } elseif ($update == "admin cannot be inactivated") { $message = "This user cannot be inactivated"; $action = ""; } else { $message = ""; } }