Se al momento di confermare la creazione dell'utente si ottiene l'errore:
1054 Unknown column 'group_description' in 'field list'
in:
[INSERT INTO phpbb_groups (group_name, group_description, group_single_user, group_moderator) VALUES (0, 'Personal User', 1, 0)]
per risolvere bisogna editare il file:
.../includes/classes /class.phpbb.php
del negozio. Cercare la funzione:
phpbb_create_account
e sostituirla con il codice seguente:
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 phpbb_config SET config_value = '{$user_id}' WHERE config_name = 'newest_user_id'";
$this->db_phpbb->Execute($sql);
$sql = "update phpbb_config SET config_value = '{$nick}' WHERE config_name = 'newest_username'";
$this->db_phpbb->Execute($sql);
$sql = "update phpbb_config 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);
}
}
[*]: http://www.zen-cart.com/forum/showthread.php?t=105472
[*]: http://www.zen-cart.com/forum/showthread.php?t=68565&highlight=phpbb&page=5
Nessun commento:
Posta un commento