// check if we have hit the limit on number of password changes to be saved. If we did then delete the oldest password from history.
eli.last();
int rowIndex = eli.currentIndex();
if(rowIndex==passwordChangeHistoryLimit){
eli.afterLast();
pwdHist = (GenericValue) eli.previous();
pwdHist.remove();
}
}
// save this password in history
GenericValue userLoginPwdHistToCreate = delegator.makeValue("UserLoginPasswordHistory", UtilMisc.toMap("userLoginId", userLoginId,"fromDate", nowTimestamp));