Hi all,

I try to authenticate a user with a (simple) JDOQL - unfortunatelly
this is not working.
(Beside username and password I'm checking if the user is already
active.)

This is my query:

--------------------------------------
        PersistenceManager pm = PMF.getPersistenceManager();
        List<User> listUser = new ArrayList<User>();

        try {

                Query query = pm.newQuery( User.class );
                query.setFilter( "password == passwordParam" );
                query.setFilter( "username == usernameParam" );
                query.setFilter( "active == activeParam" );
                query.declareParameters( "String passwordParam, String
usernameParam, Boolean activeParam" );

                listUser = (List<User>) query.execute( password, username,
true );

                if (listUser.isEmpty() ) return false;

                this.user = listUser.get( 0 );
                return true;

        }
        catch( Exception e ){
            info( "blablaaa" );
        }
        finally {
            pm.close();
        }
--------------------------------------

So currently there are two (test-)users in the database the one is
active and the other isn't.
If I login with the active user everything is fine. But if I login
with the inactive user the query returns the active user?! Even though
username and password are different!

Any ideas?
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to