boolean isUserPasswordReset ( CmsUser user ) { if ( USER_PASSWORD_STATUS . containsKey ( user . getId ( ) ) ) { //Check if user was checked before if ( ! USER_PASSWORD_STATUS . get ( user . getId ( ) ) . booleanValue ( ) ) { // was false before, false->true is never done without changing map return false ; } if ( m_checkedUserPasswordReset . contains ( user . getId ( ) ) ) { //was true before, true->false happens when user resets password. Only check one time per table load. return true ; //Set gets flushed on reloading table } } CmsUser currentUser = user ; if ( user . getAdditionalInfo ( ) . size ( ) < 3 ) { try { currentUser = m_cms . readUser ( user . getId ( ) ) ; } catch ( CmsException e ) { LOG . error ( "Can not read user" , e ) ; } } if ( currentUser . getAdditionalInfo ( CmsUserSettings . ADDITIONAL_INFO_PASSWORD_RESET ) != null ) { USER_PASSWORD_STATUS . put ( currentUser . getId ( ) , new Boolean ( true ) ) ; m_checkedUserPasswordReset . add ( currentUser . getId ( ) ) ; return true ; } USER_PASSWORD_STATUS . put ( currentUser . getId ( ) , new Boolean ( false ) ) ; return false ; }
Is the user password reset?