Merge pull request #462 from Exileum/bugfix/privmsg_clean_username

Fix multiple variable cleanup in private messaging
This commit is contained in:
Yuriy Pikhtarev 2018-06-24 20:09:13 +03:00 committed by GitHub
commit 5078ed646d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;