Fix multiple variable cleanup in private messaging

Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
Yuriy Pikhtarev 2018-06-24 20:08:27 +03:00
commit 194e6974d8
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6

View file

@ -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;