found the problem with the camp db users

The result was freed after the first pass in the while loop so only the
first user was possible to be selected. :)
Now the function works flawless