BTW, as we're all together here again 😉!
What does
ad_return_error
do (Where can I find a reference in the API). Cause it seems that this one is somehow messing up my desired result. Whenever there is no user_info (e.g not logged in) then the server doesn't respond anymore.
I plan to write to proc at the desired position again and leave out the operations in the catch block.
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 } {
ad_get_user_info
}
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.