check username in hook