Fixed a bug when multiple versions of an article exists
Use variables.tablePrefix instead of hardcoded tablePrefix
Changed function parameter from userId to userName
Added empty line for better readability