As i am not possible to test it, plz take a look, if i now got the correct way 
on implementing this:

@Override
    public List<String> findUserIdsWithConnection(Connection<?> connection) {
        ConnectionKey key = connection.getKey();
        String query = "select userId from mgnl:connections where providerId = 
"+key.getProviderId()+" AND providerUserId = "+key.getProviderUserId();
        List<String> result = new ArrayList<String>();
        try {
            NodeIterator queryResult = QueryUtil.search("connectios", query);
            if (queryResult.getSize() == 0 && connectionSignUp != null) {
                String newUserId = connectionSignUp.execute(connection);
                if (newUserId != null)
                {
                    
createConnectionRepository(newUserId).addConnection(connection);
                    return Arrays.asList(newUserId);
                }             
            } else {
                while (queryResult.hasNext()) {
                    Node n = queryResult.nextNode();
                    result.add(n.getProperty("userId").getString());
                }
            }
        } catch (Exception ex) {
            
Logger.getLogger(MagnoliaUsersConnectionRepository.class.getName()).log(Level.SEVERE,
 null, ex);
        }         
        return result;        
    }

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=ebdb81f3-4b76-43e9-8151-40333d083a95


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to