Code: Select all
##############################################################
## MOD Title: Allow login for php-fusion users
## MOD Author: Dicky < [email protected] >
## MOD Description: Allows converted php-fusion users to log in to the new phpBB board with their smf passwords
## MOD Version: 1.0.0
## MOD date: Oct 4, 2007
##
## Installation Level: easy
## Installation Time: 3 Minutes
## Files To Edit: (1) login.php
## Included Files: n/a
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
# Line 86
{
message_die(GENERAL_MESSAGE, sprintf($lang['Login_attempts_exceeded'], $board_config['max_login_attempts'], $board_config['login_reset_time']));
}
#
#-----[ AFTER, ADD ]------------------------------------
#
// check if this is a converted user
// handles php-fusion user passwords
if( md5($password) !== $row['user_password'] && $row['user_active'] )
{
if ( $row['user_password'] == md5(md5($row['user_password'])))
{
// this is a converted user. Now make them a phpBB user!
// take the subbed pass and put a md5 encryption on it and insert it into the database
$sql = "UPDATE " . USERS_TABLE . " SET user_password = '" . md5( $HTTP_POST_VARS['password'] ) . "' WHERE user_id = '" . $row['user_id'] . "'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Password Error:<br />Please contact the board administrator immediately.', '', __LINE__, __FILE__, $sql);
}
// reset $row[user_password]
$sql = "SELECT user_id, username, user_password, user_active, user_level FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Select all
#-----[ FIND ]------------------------------------------
# Line 90
# if( md5($password) == $row['user_password'] && $row['user_active'] )
#
#-----[ INLINE, FIND ]------------------------------------------
# if( md5($password)
#
#-----[ ADD AFTER ]------------------------------------------
# || md5(md5($row['user_password']))
[The extension zip has been deactivated and can no longer be displayed.]
Code: Select all
if (md5(md5(($password_old_format))) == $row['user_password'] || md5(md5(utf8_to_cp1252($password_old_format))) == $row['user_password'])
Use the admin toolkit (link in my sig) to promote yourself to an administrator on the phpBB board.fresheris wrote:Hi. after conversation i wasnt able to login. but i change my (admin) password manualy using this http://dicky.askmaggymae.com/md5/ and added it to database. now i can login, edit my own replays in a forum but i cant see the admin panel.. i cant admin my forum. can somebody help? thanks.
If you are running on phpBB3, you need to run this query in phpMyAdminfresheris wrote:Hi. after conversation i wasnt able to login. but i change my (admin) password manualy using this http://dicky.askmaggymae.com/md5/ and added it to database. now i can login, edit my own replays in a forum but i cant see the admin panel.. i cant admin my forum. can somebody help? thanks.
Code: Select all
UPDATE phpbb_users SET user_type = 3, user_permissions = '' WHERE user_id = xx