Hi *,
I'm totally new to both, WO and this list and am unfortunately about to make a rather unglamorous debut with a complete noobie question. I've tried to google, tried to find the information in the apple-developer-docs...all to no avail. :(
Here goes:
Inside the logic of my little login algorithm i do:
EOEnterpriseObject aUser = EOUtilities.objectMatchingValues(ec, "user", bindings);
This is all working fine and i can login when the user exists and the correct password has been given. But I also would like to check, whether or not the user logging in is a site admin or not. For that, my 'user' entity has a third attribute (besides "username" and "password") that is "admin". Now...from what I've read I could apparently fetch all objects from my db that have "admin = 1" and then see if my username appears anywhere in that list but this seems insanely wrong since I already have the object of interest in 'aUser'!? So my noobness boils down to this question:
How do I get the value of the column "admin" for the EOEnterpriseObject that's stored in 'aUser'?
Thank you all for your patience with noobs like me.
-MPA
P.S. any pointers to online tutorials are more than welcome! :-) |