What can i do next...?
Sorry....
Oh yeah, this problem came up after installing a "WELCOME" module,if this can help?
change the patch for common.php.
*** user.php.orig Tue Jun 17 03:20:41 2003
--- user.php Mon Sep 8 19:06:27 2003
***************
*** 70,75 ****
--- 70,81 ----
$message = '';
$HTTP_SESSION_VARS = array();
session_destroy();
+
+ //autologin code//
+ setcookie( 'uid' , -1 , time() - 3600 , '/' , '' , 0 ) ;
+ setcookie( 'pass' , -1 , time() - 3600 , '/' , '' , 0 ) ;
+ //end autologin code//
+
if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0);
}
*** include/checklogin.php.orig Tue Jun 17 03:21:32 2003
--- include/checklogin.php Mon Sep 8 19:05:05 2003
***************
*** 66,71 ****
--- 66,80 ----
$HTTP_SESSION_VARS = array();
$HTTP_SESSION_VARS['xoopsUserId'] = $user->getVar('uid');
$HTTP_SESSION_VARS['xoopsUserGroups'] = $user->getGroups();
+
+ //autologin code//
+ if( isset( $_POST['rememberme'] ) && $_POST['rememberme'] == 'On' ) {
+ $expire = time() + $xoopsConfig['session_expire'] * 60 ;
+ setcookie( 'uid' , $user->uid() , $expire , '/' , '' , 0 ) ;
+ setcookie( 'pass' , md5( $pass ) , $expire , '/' , '' , 0 ) ;
+ }
+ //end autologin code//
+
if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
setcookie($xoopsConfig['session_name'], session_id(), time()+$xoopsConfig['session_expire'], '/', '', 0);
}
*** common.php.orig Wed Jun 18 00:21:35 2003
--- common.php Wed Sep 10 16:48:18 2003
***************
*** 145,150 ****
--- 145,174 ----
}
session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));
session_start();
+
+ //autologin code//
+ if( empty( $HTTP_SESSION_VARS['xoopsUserId'] ) && isset( $_COOKIE['uid'] ) && isset( $_COOKIE['pass'] ) ) {
+ $passSQL = "SELECT COUNT(uid) FROM ".$xoopsDB->prefix("users")." WHERE pass='{$_COOKIE['pass']}' AND uid='{$_COOKIE['uid']}'" ;
+ @$passRS = $xoopsDB->query( $passSQL ) ;
+ list( $numrows ) = $xoopsDB->fetchRow( $passRS ) ;
+ if( $numrows == 1 ) {
+ $HTTP_SESSION_VARS['xoopsUserId'] = $_COOKIE['uid'] ;
+ $xoopsUser =& $member_handler->getUser($_COOKIE['uid']);
+ $HTTP_SESSION_VARS['xoopsUserGroups'] = $xoopsUser->getGroups();
+ // update time at last login
+ $updateSQL = "UPDATE ".$xoopsDB->prefix("users")." SET last_login='".time()."' WHERE uid='{$_COOKIE['uid']}'" ;
+ $xoopsDB->queryF( $updateSQL ) ;
+ // extends autologin Cookies (if you need not, do comment out)
+ $expire = time() + $xoopsConfig['session_expire'] * 60 ;
+ setcookie( 'uid' , $_COOKIE['uid'] , $expire , '/' , '' , 0 ) ;
+ setcookie( 'pass' , $_COOKIE['pass'] , $expire , '/' , '' , 0 ) ;
+ } else {
+ setcookie( 'uid' , -1 , time() - 3600 , '/' , '' , 0 ) ;
+ setcookie( 'pass' , -1 , time() - 3600 , '/' , '' , 0 ) ;
+ }
+ }
+ //end autologin code//
+
if (!empty($HTTP_SESSION_VARS['xoopsUserId'])) {
$xoopsUser =& $member_handler->getUser($HTTP_SESSION_VARS['xoopsUserId']);
if (!is_object($xoopsUser)) {
*** modules/system/templates/blocks/system_block_login.html.orig Tue Mar 18 18:31:20 2003
--- modules/system/templates/blocks/system_block_login.html Mon Sep 8 19:32:28 2003
***************
*** 1,4 ****
! <form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><{$block.lang_username}><br /><input type="text" name="uname" size="12" value="<{$block.unamevalue}>" /><br /><{$block.lang_password}><br /><input type="password" name="pass" size="12" /><br /><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" /><input type="submit" value="<{$block.lang_login}>" /><br /><{$block.sslloginlink}>
</form>
<a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}></a>
<br /><br />
--- 1,4 ----
! <form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><{$block.lang_username}><br /><input type="text" name="uname" size="12" value="<{$block.unamevalue}>" /><br /><{$block.lang_password}><br /><input type="password" name="pass" size="12" /><br /><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" /><input type="submit" value="<{$block.lang_login}>" /><br /><input type="checkbox" name="rememberme" value="On" class ="formButton" checked />Auto Login<br /><{$block.sslloginlink}>
</form>
<a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}></a>
<br /><br />
Wingz wrote:
I'm assuming there'll well and truly be table differences between the two. So I was wondering if just a normal upgrade of XOOPS and its modules - substituting myalbum-P v2.0.0 instead of myablum v1.13 will result in a flawless upgrade, or will there be work beyond my poor PHP (and code generally) skills?