Date: 01/10/01
- Next message: Harald Morgenstern: "[phplib] Fallback for Sessions with PHP4"
- Previous message: Christian.Thiele <email protected>: "[phplib] PHPlib: Additional Username"
- In reply to: Christian.Thiele <email protected>: "[phplib] PHPlib: Additional Username"
- Next in thread: Max A. Derkachev: "Re[2]: [phplib] PHPlib: Additional Username"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Christian,
Wednesday, January 10, 2001, 11:49:00 AM, you wrote:
CTblc> Hi,
CTblc> can anybody tell me at which position in the phplib I can add a field
CTblc> username to table active_sessions ?
If you add a field 'username' to the active_sessions, you'll need
change CT_Sql class method, ac_store() namely, to make it store
username into the field specified.
Look at queries there and add appropriate code to the sql statements.
E.g.:
function ac_store($id, $name, $str) {
global $auth; // you'll need this string to access $auth->auth['username']
....
$uquery = sprintf("update %s set val='%s', ".
"changed='%s', ". // added a comma
"username = '%s' ". // added a place for username
"where sid='%s' and name='%s'",
$this->database_table,
$str,
$now,
$auth->auth['username'], // the value of username
$id,
$name);
..............
Do the similar thing in insert query ($iquery).
-- Best regards, Max A. Derkachev mailto:kot <email protected> Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Harald Morgenstern: "[phplib] Fallback for Sessions with PHP4"
- Previous message: Christian.Thiele <email protected>: "[phplib] PHPlib: Additional Username"
- In reply to: Christian.Thiele <email protected>: "[phplib] PHPlib: Additional Username"
- Next in thread: Max A. Derkachev: "Re[2]: [phplib] PHPlib: Additional Username"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

