Update of /cvsroot/phpmp/phpMP/includes
In directory usw-pr-cvs1:/tmp/cvs-serv26894/includes
Modified Files:
auth.php
Log Message:
Added a very primitive registration process. Needs a LOT of enhancing.
Index: auth.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** auth.php 31 Jul 2002 17:48:38 -0000 1.17
--- auth.php 10 Aug 2002 20:41:33 -0000 1.18
***************
*** 48,52 ****
$rand_val = rand(0, 10);
! if($rand_val > 8) {
$result = $DBA->query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE expiretime < " . time());
--- 48,52 ----
$rand_val = rand(0, 10);
! if($rand_val >= 9) {
$result = $DBA->query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE expiretime < " . time());
***************
*** 69,73 ****
if (empty($_REQUEST['PHPSESSID'])) {
! SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0);
}
--- 69,73 ----
if (empty($_REQUEST['PHPSESSID'])) {
! SetCookie("PHPSESSID", session_id(), (time() + $MPCONF['SES']['session_length']), "", "", 0);
}
***************
*** 86,93 ****
$MPCONF['USR'] = $user_array;
! unset($_SESSION['user_array']);
! $_SESSION['user_array'] = $user_array;
! $this->AuthAdmin();
} else {
--- 86,101 ----
$MPCONF['USR'] = $user_array;
! if($MPCONF['USR']['active'] == 1) {
! unset($_SESSION['user_array']);
! $_SESSION['user_array'] = $user_array;
!
! $this->AuthAdmin();
!
! } else {
!
! header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=auth");
!
! }
} else {
|