Forum OpenACS Development: Re: Should object_id 0 be a user or a person?

Collapse
Posted by Barry Books on
I don't think object_id 0 should be a user because ueer_id of 0 means not logged in. I suppose you could make every package that needs to support anonymous users support a user_id of 0, but it seems much simpler just to make an anonymous user and login as that user. Then if you don't want one don't make one.

All that needs to be done is add a link on the login page that allows logging in as the anonymous user. You could even make the whole subsite anonymous and the login page just logs everyone in as the anonymous user. Or just make your package login users as anonymouns.

If you need to disable functions on the anonymous user just get the anonymous user_id instead of assuming it's 0.

Making user_id 0 a real user seems like a major change to me. I would prefer to get a request error if I happen to use user_id 0 instead of everything just going along as normal. I would not want a coding error to result in everyone being an anonymous user.