Undefined variable error when non-admin edits name record