app/models/User.java
/**
     * Authenticate a User, from a username and clear password.
     *
     * @param username  username
     * @param password  password
     * @return User if authenticated, null otherwise
     */
Authenticate a User, from a username and clear password.
@param username  username
@param password  password
@return User if authenticated, null otherwise
Authenticate a User from a username and clear password . @param username username @param password password @return User if authenticated null otherwise
public static User authenticate(String username, String password){
        User user = find.where().eq("username", username).findUnique(); 
        if (user != null) {
            if ( password .equals(user.password) ) {
                return user;
            }
        }
        return null;
    }
public static User authenticate ( String username , String password ) { User user = find . where ( ) . eq ( "username" , username ) . findUnique ( ) ; if ( user != null ) { if ( password . equals ( user . password ) ) { return user ; } } return null ; }
Authenticate a User, from a username and clear password.
Authenticate a User from a username and clear password .
// get the user with username //Crash if not unique!!