diff --git a/privmsg.php b/privmsg.php index 0783bcd3e..1108832d4 100644 --- a/privmsg.php +++ b/privmsg.php @@ -779,9 +779,7 @@ if ($mode == 'read') { if ($submit) { 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) { $error = true;