@param ApplicationRoot The current running context of the application @param userName User name of the user @param currentPassword User's current password @param newPassword New password to use in update @return ResultSet that contains error details if not successful
(String ApplicationRoot, String userName, String currentPassword, String newPassword)
| 624 | * @return ResultSet that contains error details if not successful |
| 625 | */ |
| 626 | public static boolean updatePassword (String ApplicationRoot, String userName, String currentPassword, String newPassword) |
| 627 | { |
| 628 | log.debug("*** Setter.updatePassword ***"); |
| 629 | |
| 630 | boolean result = false; |
| 631 | Connection conn = Database.getCoreConnection(ApplicationRoot); |
| 632 | try |
| 633 | { |
| 634 | log.debug("Preparing userPasswordChange call"); |
| 635 | CallableStatement callstmnt = conn.prepareCall("call userPasswordChange(?, ?, ?)"); |
| 636 | callstmnt.setString(1, userName); |
| 637 | callstmnt.setString(2, currentPassword); |
| 638 | callstmnt.setString(3, newPassword); |
| 639 | log.debug("Executing userPasswordChange"); |
| 640 | callstmnt.execute(); |
| 641 | result = true; |
| 642 | } |
| 643 | catch(SQLException e) |
| 644 | { |
| 645 | log.error("updatePassword Failure: " + e.toString()); |
| 646 | } |
| 647 | Database.closeConnection(conn); |
| 648 | log.debug("*** END updatePassword ***"); |
| 649 | return result; |
| 650 | } |
| 651 | |
| 652 | /** |
| 653 | * Updates a player's password without needing the current password |