refactored silex userhelper