Fix multiple variable cleanup in private messaging (#97)

torrentpier/torrentpier#462
This commit is contained in:
Roman Kelesidis 2023-04-01 01:12:09 +07:00 committed by GitHub
parent 2cac1d608e
commit ac15a638ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -894,9 +894,7 @@ else if ( $submit || $refresh || $mode != '' )
{
if ( !empty($_POST['username']) )
{
$to_username = clean_username($_POST['username']);
$to_username_sql = DB()->escape($to_username);
$to_userdata = get_userdata ($to_username_sql);
$to_userdata = get_userdata($_POST['username']);
if (!$to_userdata || $to_userdata['user_id'] == GUEST_UID)
{