Hi,

i am quite new to WO too but it seems to me that u should use a custom class for your user in order to have direct access to its properties or so called attribute, in your case "username", "password" and "admin", so you could check with a test if the user admin attribute match to your wish …

hope this will help a little …

GM
Le 4 déc. 06 à 21:26, [EMAIL PROTECTED] a écrit :

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! :-)
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/gillesmath% 40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to