Revokes a suspension that may have been applied to a user @param ApplicationRoot Running context of application @param userId The Identifier of the user that will be released from suspension @return
(String ApplicationRoot, String userId)
| 562 | * @return |
| 563 | */ |
| 564 | public static boolean unSuspendUser(String ApplicationRoot, String userId) |
| 565 | { |
| 566 | log.debug("*** Setter.unSuspendUser ***"); |
| 567 | |
| 568 | boolean result = false; |
| 569 | Connection conn = Database.getCoreConnection(ApplicationRoot); |
| 570 | try |
| 571 | { |
| 572 | log.debug("Prepairing suspendUser call"); |
| 573 | PreparedStatement callstmnt = conn.prepareCall("CALL unSuspendUser(?)"); |
| 574 | callstmnt.setString(1, userId); |
| 575 | log.debug("Executing unSuspendUser statement on id '" + userId + "'"); |
| 576 | callstmnt.execute(); |
| 577 | result = true; |
| 578 | } |
| 579 | catch(SQLException e) |
| 580 | { |
| 581 | log.error("unSuspendUser Failure: " + e.toString()); |
| 582 | result = false; |
| 583 | } |
| 584 | Database.closeConnection(conn); |
| 585 | log.debug("*** END unSuspendUser ***"); |
| 586 | return result; |
| 587 | } |
| 588 | |
| 589 | /** |
| 590 | * Used to increment a users CSRF counter for CSRF levels. |