Forum OpenACS Q&A: Re: "Logged In?"-Datasource and Template


Just use the search box in and you'll find the explanation for every proc in the system 😊 (in this case,

In fact that proc doesn't seem to fit too good in this situation, since it returns a http error if the user_id is not defined. You could get around this by doing something like this:

set user_id [ad_get_user_id]
if { $user_id != 0 } {

This blows away part of the handiness of this function, though. In general I don't understand why ad_get_user_info returns an http error in the first place. At least it narrows the use of it a lot. Maybe that's why e.g. the default index page of an oacs installation uses an ad hoc sql query to get the user info. I think there should definitely be an allround proc for this.