Forum OpenACS Q&A: Response to Need Chocolate Chip Cookie Recipe

Collapse
Posted by Tom Jackson on

I think ad_get_user_id returns zero for a non logged in user. Use this:

set user_id [ad_get_user_id]
if {[string match "0" ${user_id}]} {

  # do something
} else {
  # do something else
}