1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

more fixes. see the changelog for the major one.

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3734 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-03-27 17:18:48 +00:00
parent adc030875e
commit 0c42dd05df
5 changed files with 10 additions and 8 deletions

View File

@@ -78,12 +78,12 @@ function get_userdata($user)
{
global $db;
$user = ( intval($user) == 0) ? str_replace("\'", "''", htmlspecialchars(trim($user))) : intval($user);
$user = ( is_string($user)) ? str_replace("\'", "''", htmlspecialchars(trim($user))) : intval($user);
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE ";
$sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . $user . "'" ) . " AND user_id <> " . ANONYMOUS;
$sql .= ( ( is_string($user) ) ? "username = '" . $user . "'" : "user_id = $user" ) . " AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);