Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] can this work?

[DiscordArchive] can this work?

[DiscordArchive] can this work?

rektbyfaith
Administrator
0
08-13-2024, 03:01 PM
#1
Archived author: Deleted User • Posted: 2024-08-13T15:01:42.642000+00:00
Original source

can this work?
rektbyfaith
08-13-2024, 03:01 PM #1

Archived author: Deleted User • Posted: 2024-08-13T15:01:42.642000+00:00
Original source

can this work?

rektbyfaith
Administrator
0
08-13-2024, 03:01 PM
#2
Archived author: Deleted User • Posted: 2024-08-13T15:01:45.964000+00:00
Original source

// Create an account in TrinityCore
$tc_username = $db->sql_escape($user_row['username']);
$tc_password = sha1(strtoupper($user_row['username']) . ':' . strtoupper($user_password));

// Insert into TrinityCore database
$tc_query = "INSERT INTO account (username, sha_pass_hash) VALUES ('$tc_username', '$tc_password')";

if ($tc_db->query($tc_query) === TRUE) {
// Get the ID of the newly created account
$tc_account_id = $tc_db->insert_id;

// Update PHPBB users table with the TrinityCore account ID
$sql = "UPDATE phpbb_users SET tc_account_id = $tc_account_id WHERE user_id = " . $user_row['user_id'];
$db->sql_query($sql);
} else {
die('Error creating TrinityCore account: ' . $tc_db->error);
}
rektbyfaith
08-13-2024, 03:01 PM #2

Archived author: Deleted User • Posted: 2024-08-13T15:01:45.964000+00:00
Original source

// Create an account in TrinityCore
$tc_username = $db->sql_escape($user_row['username']);
$tc_password = sha1(strtoupper($user_row['username']) . ':' . strtoupper($user_password));

// Insert into TrinityCore database
$tc_query = "INSERT INTO account (username, sha_pass_hash) VALUES ('$tc_username', '$tc_password')";

if ($tc_db->query($tc_query) === TRUE) {
// Get the ID of the newly created account
$tc_account_id = $tc_db->insert_id;

// Update PHPBB users table with the TrinityCore account ID
$sql = "UPDATE phpbb_users SET tc_account_id = $tc_account_id WHERE user_id = " . $user_row['user_id'];
$db->sql_query($sql);
} else {
die('Error creating TrinityCore account: ' . $tc_db->error);
}

rektbyfaith
Administrator
0
08-13-2024, 03:07 PM
#3
Archived author: gemini • Posted: 2024-08-13T15:07:51.883000+00:00
Original source

I don't personally know the ins and outs of trying to create accounts outside of TC server console itself- it may be more involved then what you have here.
rektbyfaith
08-13-2024, 03:07 PM #3

Archived author: gemini • Posted: 2024-08-13T15:07:51.883000+00:00
Original source

I don't personally know the ins and outs of trying to create accounts outside of TC server console itself- it may be more involved then what you have here.

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)