check for current user before writing user data