I'm currently trying to write my own forum, and I was wondering about something. When a user logs in, a session is started. Depending on the "level" of the user (visitor, moderator, admin, ...) he will have different options: reply to topic, move topic, delete topic, etc. In other words, each time a user opens a topic, a check needs to be done to see what level he is, which determines what options will be available on that page.
Is it preferable to store this userlevel in a session (I will use the standard PHP4 session functions), or should I look it up in the MySQL database each time (i.e. his username is stored in a session and the rest is retrieved from the dbase with that username as an identifier)? I'm not only wondering about this in terms of speed, but also in terms of how much session-info the server can generally store without getting into memory/diskspace/speed trouble.