Added ensure user func.