[ic] UserDB custom field access?

Jonathan Clark jonc at webmaint.com
Sun Aug 17 11:15:38 EDT 2003

> I added a field to the userdb, and would like to be able to access this
> in a webpage.  I have tried various configurations of the [userdb] and
> [data] tags, but cant seem to get any data returned.
> [data session contacted]

This won't work. What you are asking for is a session variable called
'contacted'. Of course, there isn't one.

> [data table=userdb column=contacted username="[data session username]"]

Here you are nearly right, except that there is no named parameter for the
data tag called 'username'. You are using positional parameters and double
quotes, which correct as you want to interpolate something being passed.

> [data table=userdb column=contacted key="[data session username]"]

This looks like the correct syntax - perhaps there is an interpolation
issue? Have you tried:

[tmp user][data session username][/tmp]
[data table=userdb column=contacted key="[scratch user]"]

Something which may be of use is the UserDB directive, where you can
autoload your value into a scratch when the user logs in:

UserDB  default  scratch  contacted

Look for this directive in your catalog.cfg file and add your field to the
list in inverted commas.

good luck!


Jonathan Clark
Webmaint.com - Building Clever Websites   http://www.webmaint.com/
Webmaint.net - Business Web Hosting       http://www.webmaint.net/

More information about the interchange-users mailing list