Zen Cart Logo
Forums / General Questions / Zencart and Phpbb - Forgot Password Integration Issue

Zencart and Phpbb - Forgot Password Integration Issue

Locked

Views: 1,180

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
6 Sep 2008, 4:29 PM
#1
ka678 avatar

ka678

New Zenner

Join Date:
Aug 2008
Posts:
4
Plugin Contributions:
0

Zencart and Phpbb - Forgot Password Integration Issue

I was wondering if you'd be able to assist me with something. I haven't been able to find anything on this issue.

I've been able to successfully link my Zencart 1.3.8a with PhpBB 3.0.0. So when users create accounts in Zencart, they are asked to create a forum nickname and all the info transfers over to the PhpBB tables.

But the issue I'm coming across now is when users use the "Forgot Password" function in Zencart. When they first create their account, the password that was originally setup will work in both Zencart and the PhpBB forum. But once they use the "Forgot Password" function in Zencart, the Zencart password is reset but the user's PhpBB forum login is not reset and remains the same.

What can I do to have the password reset on both tables (Zencart & PhpBB) if a user decides to use the Zencart "Forgot Password" function?

THIS IS THE CODE FROM class.phpbb.php THAT CREATES THE ACCOUNTS IN ZENCART AND PHPBB:

function phpbb_create_account($nick, $password, $email_address) {
if ($this->phpBB['installed'] != true || !zen_not_null($password) || !zen_not_null($email_address) || !zen_not_null($nick)) return false;
if ($this->phpbb_check_for_duplicate_email($email_address) == 'already_exists') {
// $this->phpbb_change_email($old_email, $email_address);
} else {
$sql = "select max(user_id) as total from " . $this->phpBB['users_table'];
$phpbb_users = $this->db_phpbb->Execute($sql);
$user_id = ($phpbb_users->fields['total'] + 1);
$sql = "insert into " . $this->phpBB['users_table'] . "
(user_id, group_id, username, username_clean, user_password, user_email, user_regdate)
values
('" . (int)$user_id . "',2, '" . $nick . "', '" . $nick . "', '" . md5($password) . "', '" . $email_address . "', '" . time() ."')";
$this->db_phpbb->Execute($sql);
$sql = " update " . $this->phpBB['config_table'] . " SET config_value = '{$user_id}' WHERE config_name = 'newest_user_id'";
$this->db_phpbb->Execute($sql);
$sql = " update " . $this->phpBB['config_table'] . " SET config_value = '{$nick}' WHERE config_name = 'newest_username'";
$this->db_phpbb->Execute($sql);
$sql = " update " . $this->phpBB['config_table'] . " SET config_value = config_value + 1 WHERE config_name = 'num_users'";
$this->db_phpbb->Execute($sql);

$sql = "INSERT INTO " . $this->phpBB['user_group_table'] . " (user_id, group_id, user_pending)
VALUES ($user_id, 2, 0)";
$this->db_phpbb->Execute($sql);
}
}

10 Sep 2008, 3:53 AM
#2
ka678 avatar

ka678

New Zenner

Join Date:
Aug 2008
Posts:
4
Plugin Contributions:
0

Re: Zencart and Phpbb - Forgot Password Integration Issue

Hi again. Just wanted to bump this up and see if anybody has any suggestions.

21 Sep 2008, 6:51 AM
#3
tagyourbaby avatar

tagyourbaby

New Zenner

Join Date:
Feb 2008
Location:
Auckland, NZ
Posts:
53
Plugin Contributions:
0

Re: Zencart and Phpbb - Forgot Password Integration Issue

bump up

18 Aug 2009, 8:13 AM
#4
littlehawk avatar

littlehawk

New Zenner

Join Date:
Jan 2009
Posts:
85
Plugin Contributions:
0

Re: Zencart and Phpbb - Forgot Password Integration Issue

integratoin should not be a problem, I've tested it and the issue should not be a matter