[ORB-666] fixed bug related to the new config option "show all users" (foreign key was broken)