public boolean checkPassword ( final String _passwd ) throws EFapsException { boolean ret = false ; final PrintQuery query = new PrintQuery ( CIAdminUser . Person . getType ( ) , getId ( ) ) ; query . addAttribute ( CIAdminUser . Person . Password , CIAdminUser . Person . LastLogin , CIAdminUser . Person . LoginTry , CIAdminUser . Person . LoginTriesCounter , CIAdminUser . Person . Status ) ; if ( query . executeWithoutAccessCheck ( ) ) { final PasswordStore pwd = query . < PasswordStore > getAttribute ( CIAdminUser . Person . Password ) ; if ( pwd . checkCurrent ( _passwd ) ) { ret = query . < Boolean > getAttribute ( CIAdminUser . Person . Status ) ; } else { setFalseLogin ( query . < DateTime > getAttribute ( CIAdminUser . Person . LoginTry ) , query . < Integer > getAttribute ( CIAdminUser . Person . LoginTriesCounter ) ) ; } } return ret ; }
The instance method checks if the given password is the same password as the password in the database .