Project

General

Profile

« Previous | Next » 

Revision 8421

Added by Jing Tao over 10 years ago

Fixed an issue to check if an account exists.

View differences:

src/edu/ucsb/nceas/metacat/authentication/AuthFile.java
297 297
        if(userName == null || userName.trim().equals("")) {
298 298
            throw new AuthenticationException("AuthFile.userExist - can't judge if a user exists when its name is null or blank.");
299 299
        }
300
        List<Object> users = userpassword.getList(SLASH+SLASH+USERS+SLASH+USER+"["+AT+NAME+"='"+userName+"']");
301
        if(users != null && users.size() >0) {
300
        List<Object> users = userpassword.getList(USERS+SLASH+USER+SLASH+AT+NAME);
301
        if(users != null && users.contains(userName)) {
302 302
            return true;
303 303
        } else {
304 304
            return false;

Also available in: Unified diff