fixed get_plan_permissions to work with username that have a long
version