[Openfirst-cvscommit] base/config auth.php,1.6,1.7
Brought to you by:
xtimg
From: <i-...@us...> - 2003-10-15 00:14:45
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv3155/config Modified Files: auth.php Log Message: Moved logout functionality to this script to allow it to be shared by several modules. Index: auth.php =================================================================== RCS file: /cvsroot/openfirst/base/config/auth.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** auth.php 13 Oct 2003 17:12:29 -0000 1.6 --- auth.php 15 Oct 2003 00:14:41 -0000 1.7 *************** *** 46,49 **** --- 46,58 ---- } + function logout(){ + if(isset($GLOBALS["user"]->user)) { + $q = ofirst_dbquery("UPDATE ofirst_members SET authcode = NULL WHERE user='".$GLOBALS["user"]->user."';"); + echo(ofirst_dberror()); + @session_start(); + @session_destroy(); + } + } + function showlogin () { // Show a login form for the user. |