Fix incorrect deduction of username in deploy hook.