Component index
Section index

Component websession_sql


Search

Type

Function

Summary

Preserve session variable into an SQL database

Description

Session variables are W_VAR (W_SSTRING, W_INT) defined with the option S. They are loaded/saved on a user per user basis. Users (session in fact) are identified by a cookie.

bool auth (WEBSESSION_SQL_INFO &info, const char *passwd)
void exec (WEBSESSION_SQL_INFO &info)

Examples

sample / websession_sql component / new session
sample / websession_sql component / old session

Prototypes

void websession_sql (const char *realm)

Functags

bool auth (WEBSESSION_SQL_INFO &info, const char *passwd) Optional

Check if a password is valid

Return true if the user has supplied the proper password. By default, password are not validated. The component is only used to preserve session variable in that case.

void exec (WEBSESSION_SQL_INFO &info) Mandatory

Exec the web page when access is validated

At this point, session variable are reloaded and will be saved when this functag ends