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);
}
}



