Exemple #1
0
 // Reset password
 public int resetPassword(int userId, String newPassword) {
   logManager.logInfo("Entering 'resetPassword(int userId, String newPassword)' method");
   int result = 0;
   try {
     sqlString = queryBuilder.sqlUpdatePassword(newPassword, userId);
     result = executeQuery.executeInsert(sqlString);
     if (result > 0) {
       executeQuery.commit();
     } else {
       executeQuery.rollBack();
     }
   } catch (Exception exception) {
     logManager.logError(
         "Exception was thrown and caught in 'resetPassword(int userId, String newPassword)' method");
   }
   logManager.logInfo("Exiting 'resetPassword(int userId, String newPassword)' method");
   return result;
 }