This gets the in shop credit of the current logged in user, or when a userId is passed on and the current user is member of the admin group, the credit of the user that corresponds to the passed on userId.
Author: BartJol