Refactor code

Move function into helper. Move parameter getting into the
mod_fakeonlineusers.php file.