MCPcopy Create free account
hub / github.com/OWASP/SecurityShepherd / unSuspendUser

Method unSuspendUser

src/main/java/dbProcs/Setter.java:564–587  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 3

testSuspendUserMethod · 0.95
testUnSuspendUserMethod · 0.95
doPostMethod · 0.95

Calls 2

getCoreConnectionMethod · 0.95
closeConnectionMethod · 0.95

Tested by 2

testSuspendUserMethod · 0.76
testUnSuspendUserMethod · 0.76