Added userId to update RegID function