Fixed null $u_data if user not found (#783)

This commit is contained in:
Roman Kelesidis 2023-06-06 15:54:32 +07:00 committed by GitHub
commit f4de0d17cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -991,6 +991,10 @@ function get_userdata($u, $force_name = false, $allow_guest = false)
}
}
if (is_null($u_data)) {
return false;
}
if ($u_data['user_id'] == GUEST_UID) {
CACHE('bb_cache')->set('guest_userdata', $u_data);
}